user/submission/comment: avoid queries if awards are disabled
This commit is contained in:
parent
97c9300a6f
commit
026a9efe2b
5 changed files with 9 additions and 3 deletions
|
@ -376,7 +376,7 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def received_awards(self):
|
||||
|
||||
if not FEATURES['AWARDS']: return []
|
||||
awards = {}
|
||||
|
||||
posts_idlist = [x[0] for x in g.db.query(Submission.id).filter_by(author_id=self.id).all()]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue