Skip to content

Commit

Permalink
chore: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 committed Aug 5, 2023
1 parent baa068b commit fbbf6e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion erpnext/accounts/doctype/subscription/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ def is_new_subscription(self) -> bool:
"""
Returns `True` if `Subscription` has never generated an invoice
"""
return not frappe.db.exists({"doctype": self.invoice_document_type, "subscription": self.name})
return self.is_new() or not frappe.db.exists(
{"doctype": self.invoice_document_type, "subscription": self.name}
)

def validate(self) -> None:
self.validate_trial_period()
Expand Down

0 comments on commit fbbf6e2

Please sign in to comment.