mirror of
https://github.com/discourse/discourse.git
synced 2025-03-04 02:09:30 +00:00
optimise
This commit is contained in:
parent
0e1174dbe8
commit
dd03f44968
@ -506,7 +506,7 @@ class User < ActiveRecord::Base
|
||||
|
||||
def add_trust_level
|
||||
# there is a possiblity we did no load trust level column, skip it
|
||||
return unless attributes.key? "trust_level"
|
||||
return unless attribute_present? :trust_level
|
||||
self.trust_level ||= SiteSetting.default_trust_level
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user