This commit is contained in:
Aevann1 2021-09-19 20:25:40 +02:00
parent a16d56358c
commit c5f8e567bb
10 changed files with 77 additions and 7 deletions

View file

@ -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']