mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(models.package_group): add backref cascade
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
1af61b0c50
commit
2cb9de0800
1 changed files with 4 additions and 2 deletions
|
@ -15,11 +15,13 @@ class PackageGroup(Base):
|
||||||
}
|
}
|
||||||
|
|
||||||
Package = relationship(
|
Package = relationship(
|
||||||
_Package, backref=backref("package_groups", lazy="dynamic"),
|
_Package, backref=backref("package_groups", lazy="dynamic",
|
||||||
|
cascade="all, delete"),
|
||||||
foreign_keys=[__table__.c.PackageID])
|
foreign_keys=[__table__.c.PackageID])
|
||||||
|
|
||||||
Group = relationship(
|
Group = relationship(
|
||||||
_Group, backref=backref("package_groups", lazy="dynamic"),
|
_Group, backref=backref("package_groups", lazy="dynamic",
|
||||||
|
cascade="all, delete"),
|
||||||
foreign_keys=[__table__.c.GroupID])
|
foreign_keys=[__table__.c.GroupID])
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
|
Loading…
Add table
Reference in a new issue