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:
David Taylor 2020-10-07 16:55:32 +01:00 committed by GitHub
parent 71d37953d5
commit 16daf3c986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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