FIX: Compare Jobs::UserEmail type argument as string (#10851)
In specs, symbols are passed through correctly. But in production, all arguments are provided to jobs as strings.
Followup to c0293339b8
This commit is contained in:
parent
71d37953d5
commit
16daf3c986
|
@ -24,7 +24,7 @@ module Jobs
|
|||
|
||||
send_user_email(args)
|
||||
|
||||
if args[:user_id].present? && args[:type] == :digest
|
||||
if args[:user_id].present? && args[:type].to_s == "digest"
|
||||
# Record every attempt at sending a digest email, even if it was skipped
|
||||
UserStat.where(user_id: args[:user_id]).update_all(digest_attempted_at: Time.zone.now)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue