Fix update when no tag or category
This commit is contained in:
		
							parent
							
								
									27686a5d04
								
							
						
					
					
						commit
						147b7b9292
					
				|  | @ -93,14 +93,14 @@ helper Admin::PagePartsHelper | |||
|       @item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id ) | ||||
|     end | ||||
| 	 | ||||
|   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] = 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 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue