Fix Gallery frontend controller crash when albun.tag_ids is empty
This commit is contained in:
parent
827a5e52e7
commit
7519533107
|
@ -46,7 +46,8 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
|||
@album = GalleryAlbum.find(@albumid)
|
||||
@images = @album.gallery_images.all
|
||||
tags = @album.tag_ids
|
||||
@tagnames = Tag.find(tags.tagged_ids).map{|t| t.name}
|
||||
@tagnames = [] if tags.blank?
|
||||
@tagnames = Tag.find(tags.tagged_ids).map{|t| t.name} if !tags.blank?
|
||||
@back_link = panel_gallery_front_end_album_path(@albumid)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue