mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-10 14:04:35 -04:00
FIX: only update column if we have a user
This commit is contained in:
parent
8699c929db
commit
65826ab3a6
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue