diff --git a/files/classes/award.py b/files/classes/award.py index b338516d2..e8e0389f0 100644 --- a/files/classes/award.py +++ b/files/classes/award.py @@ -14,6 +14,7 @@ class AwardRelationship(Base): comment_id = Column(Integer, ForeignKey("comments.id")) kind = Column(String) awarded_utc = Column(Integer) + granted = Column(Boolean) user = relationship("User", primaryjoin="AwardRelationship.user_id==User.id", back_populates="awards") post = relationship("Submission", primaryjoin="AwardRelationship.submission_id==Submission.id", back_populates="awards") diff --git a/files/routes/awards.py b/files/routes/awards.py index 2c48c1b83..5e4e3d209 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -383,7 +383,8 @@ def admin_userawards_post(v): for x in range(int(value)): award = AwardRelationship( user_id=u.id, - kind=key + kind=key, + granted=True ) g.db.add(award)