mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 00:37:06 +08:00
FIX: only update column if we have a user
This commit is contained in:
parent
8699c929db
commit
65826ab3a6
|
@ -4,7 +4,9 @@ module Jobs
|
|||
|
||||
def execute(args)
|
||||
user = User.find_by(id: args[:user_id])
|
||||
user.update_column(:last_redirected_to_top_at, args[:redirected_at])
|
||||
if user
|
||||
user.update_column(:last_redirected_to_top_at, args[:redirected_at])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user