fix: use safe nav when downcasing email in from_email (#9139)

Use safe nav when downcasing email in from_email
This commit is contained in:
Ryan Kon
2024-03-21 06:14:04 -07:00
committed by GitHub
parent 44956176a1
commit 762a39330a
2 changed files with 2 additions and 2 deletions

View File

@@ -157,7 +157,7 @@ class User < ApplicationRecord
end
def self.from_email(email)
find_by(email: email.downcase)
find_by(email: email&.downcase)
end
private