Do not crash if delete() is called with an empty list. #050182
This commit is contained in:
parent
264297b4d1
commit
1a8c781e2e
7
party.py
7
party.py
|
@ -80,9 +80,10 @@ class Party(metaclass=PoolMeta):
|
|||
|
||||
super(Party, cls).delete(parties)
|
||||
|
||||
cursor.execute(*party_company.delete(
|
||||
where=(party_company.party.in_(party_ids))
|
||||
))
|
||||
if party_ids:
|
||||
cursor.execute(*party_company.delete(
|
||||
where=(party_company.party.in_(party_ids))
|
||||
))
|
||||
|
||||
def get_current_company(self, name):
|
||||
pool = Pool()
|
||||
|
|
Loading…
Reference in New Issue