Fix package deletion

Fixes #192
This commit is contained in:
rubenwardy
2022-06-01 17:29:56 +01:00
parent 8b5d767d3c
commit adaf44bc2b
2 changed files with 63 additions and 49 deletions

View File

@@ -402,7 +402,8 @@ class Package(db.Model):
downloads = db.Column(db.Integer, nullable=False, default=0)
review_thread_id = db.Column(db.Integer, db.ForeignKey("thread.id"), nullable=True, default=None)
review_thread = db.relationship("Thread", uselist=False, foreign_keys=[review_thread_id], back_populates="is_review_thread")
review_thread = db.relationship("Thread", uselist=False, foreign_keys=[review_thread_id],
back_populates="is_review_thread", post_update=True)
# Downloads
repo = db.Column(db.String(200), nullable=True)