mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 18:48:54 +08:00
correct the test
This commit is contained in:
parent
c52784f9d2
commit
5346cd3514
@ -74,7 +74,7 @@ class UserAuthToken < ActiveRecord::Base
|
||||
if mark_seen && user_token && !user_token.auth_token_seen && user_token.auth_token == token
|
||||
# we must protect against concurrency issues here
|
||||
changed_rows = UserAuthToken.where(id: user_token.id, auth_token: token).update_all(auth_token_seen: true)
|
||||
if changed_rows
|
||||
if changed_rows == 1
|
||||
# not doing a reload so we don't risk loading a rotated token
|
||||
user_token.auth_token_seen = true
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user