add conditions for making multi cates and tags more stable
This commit is contained in:
parent
9e33bdadc3
commit
635d3f1690
|
@ -65,11 +65,11 @@ class Admin::PagePartsController < OrbitBackendController
|
||||||
params[:page_part][:module_app] = nil
|
params[:page_part][:module_app] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:page_part][:tag] && params[:page_part][:tag].include?("nil")
|
if params[:page_part][:tag].nil? || params[:page_part][:tag].include?("nil")
|
||||||
params[:page_part][:tag] = []
|
params[:page_part][:tag] = []
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:page_part][:category] && params[:page_part][:category].include?("nil")
|
if params[:page_part][:category].nil? || params[:page_part][:category].include?("nil")
|
||||||
params[:page_part][:category] = []
|
params[:page_part][:category] = []
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -81,11 +81,11 @@ helper Admin::PagePartsHelper
|
||||||
params[:page][:frontend_field_type] = nil
|
params[:page][:frontend_field_type] = nil
|
||||||
params[:page][:frontend_field_is_link] = nil
|
params[:page][:frontend_field_is_link] = nil
|
||||||
|
|
||||||
if params[:page][:tag] && params[:page][:tag].include?("nil")
|
if params[:page][:tag].nil? || params[:page][:tag].include?("nil")
|
||||||
params[:page][:tag] = []
|
params[:page][:tag] = []
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:page][:category] && params[:page][:category].include?("nil")
|
if params[:page][:category].nil? || params[:page][:category].include?("nil")
|
||||||
params[:page][:category] = []
|
params[:page][:category] = []
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue