fixed 500 on photos#show for private photos and logged out user
This commit is contained in:
parent
cfbc2b7546
commit
10fa7ba024
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ class PhotosController < ApplicationController
|
|||
if user_signed_in?
|
||||
@photo = current_user.find_visible_shareable_by_id(Photo, params[:id])
|
||||
else
|
||||
@photo = Photo.where(id => params[:id], :public => true)
|
||||
@photo = Photo.where(:id => params[:id], :public => true).first
|
||||
end
|
||||
|
||||
if @photo
|
||||
|
|
|
|||
Loading…
Reference in a new issue