membershipworks: Fix check for existing invoices in EventInvoiceForm
All checks were successful
Ruff / ruff (push) Successful in 1m16s
Test / test (push) Successful in 5m14s

This commit is contained in:
Adam Goldsmith 2024-05-15 19:31:55 -04:00
parent 4d66f76a02
commit a7e7fafedd

View File

@ -22,7 +22,7 @@ class EventInvoiceForm(forms.Form):
super().__init__(*args, **kwargs)
def clean(self):
if hasattr(self.event, "invoice") is not None:
if hasattr(self.event, "invoice"):
raise forms.ValidationError("An invoice was already created!")
if not self.event.ready_for_invoice: