Added condition for default locale present

This commit is contained in:
saurabhbhatia 2013-12-02 14:30:12 +08:00
parent d0d6a4147e
commit 888f41a959
1 changed files with 2 additions and 2 deletions

View File

@ -22,8 +22,8 @@ class Admin::SitesController < OrbitBackendController
def update
if params[:site][:default_locale] && @site.enable_language_detection.eql?(true)
Site.update_all({:enable_language_detection => false})
elsif params[:site][:enable_language_detection]
Site.update_all({:enable_language_detection => false})
elsif params[:site][:enable_language_detection] && @site.default_locale.present?
Site.update_all({:default_locale => nil})
end
# if params[:site][:enable_language_detection]