mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Improve checks for non-human users.
This commit is contained in:
parent
aeb169bd0e
commit
5943543ec3
8 changed files with 15 additions and 12 deletions
|
@ -3,7 +3,7 @@ class DraftSequence < ActiveRecord::Base
|
|||
user_id = user
|
||||
user_id = user.id unless user.class == Fixnum
|
||||
|
||||
return 0 if user_id == Discourse::SYSTEM_USER_ID
|
||||
return 0 if user_id < 0
|
||||
|
||||
h = { user_id: user_id, draft_key: key }
|
||||
c = DraftSequence.find_by(h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue