Fix review votes not cascade deleting

This commit is contained in:
rubenwardy 2021-08-21 22:55:11 +01:00
parent 32372e8e86
commit 46a38753a9
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ class PackageReview(db.Model):
recommends = db.Column(db.Boolean, nullable=False)
thread = db.relationship("Thread", uselist=False, back_populates="review")
votes = db.relationship("PackageReviewVote", back_populates="review")
votes = db.relationship("PackageReviewVote", back_populates="review", cascade="all, delete, delete-orphan")
score = db.Column(db.Integer, nullable=False, default=1)