Fix update when no tag or category
This commit is contained in:
parent
27686a5d04
commit
147b7b9292
|
@ -96,11 +96,11 @@ helper Admin::PagePartsHelper
|
||||||
params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field]
|
params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field]
|
||||||
params[:page][:frontend_field_type] = nil
|
params[:page][:frontend_field_type] = nil
|
||||||
|
|
||||||
if params[:page][:tag].include?("nil")
|
if params[:page][:tag] && params[:page][:tag].include?("nil")
|
||||||
params[:page][:tag] = []
|
params[:page][:tag] = []
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:page][:category].include?("nil")
|
if params[:page][:category] && params[:page][:category].include?("nil")
|
||||||
params[:page][:category] = []
|
params[:page][:category] = []
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue