mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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)
|
def execute(args)
|
||||||
user = User.find_by(id: args[:user_id])
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user