FIX: only update column if we have a user

This commit is contained in:
Sam 2014-08-19 17:26:20 +10:00
parent 8699c929db
commit 65826ab3a6

View File

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