fix(PackageNotification): add missing backref cascade

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-12-06 21:30:23 -08:00
parent 27f8603dc5
commit 0447afa2e5
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -15,12 +15,14 @@ class PackageNotification(Base):
}
User = relationship(
_User, backref=backref("notifications", lazy="dynamic"),
_User, backref=backref("notifications", lazy="dynamic",
cascade="all, delete"),
foreign_keys=[__table__.c.UserID])
PackageBase = relationship(
_PackageBase,
backref=backref("notifications", lazy="dynamic"),
backref=backref("notifications", lazy="dynamic",
cascade="all, delete"),
foreign_keys=[__table__.c.PackageBaseID])
def __init__(self, **kwargs):