Skip to content

Commit 48a74c5

Browse files
committed
fix prod bug: Teams::Member#username delegated to user.username, but user is nil
1 parent 7335849 commit 48a74c5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/helpers/users_helper.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@ def users_team_image_tag(user, options = {})
2424

2525
def users_image_tag(user, options = {})
2626
options[:class] ||= 'avatar'
27-
options[:alt] ||= user.username
28-
image_tag(users_image_path(user), options)
27+
#FIXME
28+
if user
29+
options[:alt] ||= user.username
30+
image_tag(users_image_path(user), options)
31+
else
32+
image_tag('blank-mugshot.png', options)
33+
end
2934
end
3035

3136
#TODO Remove
@@ -118,7 +123,7 @@ def empty_stats
118123
end
119124

120125
def estimated_delivery_date
121-
if Date.today.end_of_week == Date.today
126+
if Date.today.end_of_week == Date.today
122127
Date.today + 7.days
123128
else
124129
Date.today.end_of_week

0 commit comments

Comments
 (0)