fix: Remove all foreign_keys args - let SQLAlchemy infer from explicit primaryjoin
This commit is contained in:
parent
a79a604a14
commit
e15583d8e5
|
|
@ -153,11 +153,9 @@ class UserContainer(db.Model):
|
||||||
|
|
||||||
# Relationships (explicit primaryjoin wegen mehrerer FKs zu User)
|
# Relationships (explicit primaryjoin wegen mehrerer FKs zu User)
|
||||||
user = db.relationship('User',
|
user = db.relationship('User',
|
||||||
foreign_keys=['user_id'],
|
|
||||||
primaryjoin='UserContainer.user_id==User.id',
|
primaryjoin='UserContainer.user_id==User.id',
|
||||||
back_populates='containers')
|
back_populates='containers')
|
||||||
blocker = db.relationship('User',
|
blocker = db.relationship('User',
|
||||||
foreign_keys=['blocked_by'],
|
|
||||||
primaryjoin='UserContainer.blocked_by==User.id')
|
primaryjoin='UserContainer.blocked_by==User.id')
|
||||||
|
|
||||||
# Unique: Ein User kann nur einen Container pro Typ haben
|
# Unique: Ein User kann nur einen Container pro Typ haben
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user