check if profile exists before fetching profile photo
This commit is contained in:
parent
7c6bc7f7ea
commit
0b36e955fe
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def image_or_default(person)
|
||||
image_location = person.profile.image_url
|
||||
image_location = person.profile.image_url if person.profile
|
||||
image_location ||= "/images/user/default.png"
|
||||
image_location
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue