fsdfs
This commit is contained in:
parent
a16d56358c
commit
c5f8e567bb
10 changed files with 77 additions and 7 deletions
|
@ -70,17 +70,21 @@ class AwardRelationship(Base):
|
|||
comment = relationship("Comment", primaryjoin="AwardRelationship.comment_id==Comment.id", lazy="joined", viewonly=True)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def given(self):
|
||||
return bool(self.submission_id) or bool(self.comment_id)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def type(self):
|
||||
return AWARDS[self.kind]
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def title(self):
|
||||
return self.type['title']
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def class_list(self):
|
||||
return self.type['icon']+' '+self.type['color']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue