try to fix sqyalchemy-error wieh deleting a forkrankmember

This commit is contained in:
Ember 'n0emis' Keske 2022-07-27 14:12:02 +02:00
parent 2f1347f341
commit 3a113c9baf
No known key found for this signature in database
GPG Key ID: 00FAF748B777CF10

View File

@ -278,7 +278,7 @@ class YwsdForkRankMemberModel(ForkRankMemberModel):
conn.execute( conn.execute(
ForkRank.member_table.update() ForkRank.member_table.update()
.where( .where(
_and( sqlalchemy.and_(
ForkRank.member_table.c.forkrank_id ForkRank.member_table.c.forkrank_id
== self.diffsync.get("forkrank", self.forkrank).forkrank_id, == self.diffsync.get("forkrank", self.forkrank).forkrank_id,
ForkRank.member_table.c.extension_id ForkRank.member_table.c.extension_id
@ -293,7 +293,7 @@ class YwsdForkRankMemberModel(ForkRankMemberModel):
with self.diffsync.engine.connect() as conn: with self.diffsync.engine.connect() as conn:
conn.execute( conn.execute(
ForkRank.member_table.delete().where( ForkRank.member_table.delete().where(
_and( sqlalchemy.and_(
ForkRank.member_table.c.forkrank_id ForkRank.member_table.c.forkrank_id
== self.diffsync.get("forkrank", self.forkrank).forkrank_id, == self.diffsync.get("forkrank", self.forkrank).forkrank_id,
ForkRank.member_table.c.extension_id ForkRank.member_table.c.extension_id