forked from rDrama/rDrama
1
0
Fork 0
master
fireworks88 2021-07-24 21:36:49 +02:00
parent 22303531b0
commit 145bb65cee
2 changed files with 6 additions and 1 deletions

View File

@ -175,7 +175,8 @@ def retry(f):
return f(self, *args, **kwargs) return f(self, *args, **kwargs)
except OperationalError as e: except OperationalError as e:
#self.session.rollback() #self.session.rollback()
raise(DatabaseOverload) #raise(DatabaseOverload)
abort(500)
except: except:
self.session.rollback() self.session.rollback()
return f(self, *args, **kwargs) return f(self, *args, **kwargs)

View File

@ -43,3 +43,7 @@ class AwardRelationship(Base):
primaryjoin="AwardRelationship.comment_id==Comment.id", primaryjoin="AwardRelationship.comment_id==Comment.id",
lazy="joined" lazy="joined"
) )
@property
def type(self):
return AWARDS[self.kind]