Added condition for default locale present
This commit is contained in:
parent
d0d6a4147e
commit
888f41a959
|
@ -22,8 +22,8 @@ class Admin::SitesController < OrbitBackendController
|
||||||
|
|
||||||
def update
|
def update
|
||||||
if params[:site][:default_locale] && @site.enable_language_detection.eql?(true)
|
if params[:site][:default_locale] && @site.enable_language_detection.eql?(true)
|
||||||
Site.update_all({:enable_language_detection => false})
|
Site.update_all({:enable_language_detection => false})
|
||||||
elsif params[:site][:enable_language_detection]
|
elsif params[:site][:enable_language_detection] && @site.default_locale.present?
|
||||||
Site.update_all({:default_locale => nil})
|
Site.update_all({:default_locale => nil})
|
||||||
end
|
end
|
||||||
# if params[:site][:enable_language_detection]
|
# if params[:site][:enable_language_detection]
|
||||||
|
|
Reference in New Issue