diff --git a/quickbooks/mixins.py b/quickbooks/mixins.py index dd3ab98..201ba4a 100644 --- a/quickbooks/mixins.py +++ b/quickbooks/mixins.py @@ -59,7 +59,7 @@ class UpdateMixin(object): def save(self): qb = QuickBooks() - if self.Id > 0: + if self.Id and self.Id > 0: json_data = qb.update_object(self.qbo_object_name, self.to_json()) else: json_data = qb.create_object(self.qbo_object_name, self.to_json())