diff --git a/party.py b/party.py index bd59904..cd3f7d8 100644 --- a/party.py +++ b/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()