Fix update when no tag or category

This commit is contained in:
chris 2013-03-07 17:30:49 +08:00
parent 27686a5d04
commit 147b7b9292
1 changed files with 4 additions and 4 deletions

View File

@ -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_type] = nil
if params[:page][:tag].include?("nil")
if params[:page][:tag] && params[:page][:tag].include?("nil")
params[:page][:tag] = []
end
if params[:page][:category].include?("nil")
if params[:page][:category] && params[:page][:category].include?("nil")
params[:page][:category] = []
end