Skip to content

Commit

Permalink
When displaying errors on ScenarioUser, allow user to be nil
Browse files Browse the repository at this point in the history
  • Loading branch information
noracato committed May 24, 2024
1 parent 09fb47c commit daf5580
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/scenario_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def update_role(role_sym)

# How to recognise the record for error messages
def email
user_email || user.email
user_email || user&.email
end

def as_json(*)
Expand Down

0 comments on commit daf5580

Please sign in to comment.