diff --git a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb index 98cf250e..65569315 100644 --- a/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb +++ b/vendor/built_in_modules/gallery/app/controllers/panel/gallery/back_end/albums_controller.rb @@ -189,7 +189,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController @album = Album.find(params[:id]) tagsToDestroy = [] tagsToAdd = [] - new_tags = params[:album][:tag_ids] + new_tags = params[:album][:tag_ids] || [] old_tags = @album.tagged_ids old_tags.each do |tag| if !new_tags.include?(tag) @@ -204,6 +204,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController end end update_children_image_tag(tagsToDestroy,tagsToAdd) + params[:album][:tag_ids] = params[:album][:tag_ids] || [] @album.update_attributes(params[:album]) redirect_to panel_gallery_back_end_album_path(@album) end