mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(fastapi): fix Package's PackageBase backref cascade
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
d097799b34
commit
f4ef02fa5b
1 changed files with 2 additions and 1 deletions
|
@ -12,7 +12,8 @@ class Package(Base):
|
||||||
__mapper_args__ = {"primary_key": [__table__.c.ID]}
|
__mapper_args__ = {"primary_key": [__table__.c.ID]}
|
||||||
|
|
||||||
PackageBase = relationship(
|
PackageBase = relationship(
|
||||||
_PackageBase, backref=backref("packages", lazy="dynamic"),
|
_PackageBase, backref=backref("packages", lazy="dynamic",
|
||||||
|
cascade="all, delete"),
|
||||||
foreign_keys=[__table__.c.PackageBaseID])
|
foreign_keys=[__table__.c.PackageBaseID])
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue