Skip to content

Commit 836ff0f

Browse files
committed
Merge pull request hasgeek#106 from hasgeek/client-not-orphan
A delete-orphan cascade on Client.org and Client.user cannot be set, as ...
2 parents 55d9df3 + b7f9dcf commit 836ff0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lastuser_core/models/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ class Client(BaseMixin, db.Model):
1717
#: User who owns this client
1818
user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=True)
1919
user = db.relationship(User, primaryjoin=user_id == User.id,
20-
backref=db.backref('clients', cascade="all, delete-orphan"))
20+
backref=db.backref('clients', cascade="all"))
2121
#: Organization that owns this client. Only one of this or user must be set
2222
org_id = db.Column(db.Integer, db.ForeignKey('organization.id'), nullable=True)
2323
org = db.relationship(Organization, primaryjoin=org_id == Organization.id,
24-
backref=db.backref('clients', cascade="all, delete-orphan"))
24+
backref=db.backref('clients', cascade="all"))
2525
#: Human-readable title
2626
title = db.Column(db.Unicode(250), nullable=False)
2727
#: Long description

0 commit comments

Comments
 (0)