mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 18:22:40 +08:00
FIX: Improve checks for non-human users.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user