From a7e7fafedd0ee622dc0f9782cc58cd0feb58a23e Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 15 May 2024 19:31:55 -0400 Subject: [PATCH] membershipworks: Fix check for existing invoices in `EventInvoiceForm` --- membershipworks/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/membershipworks/forms.py b/membershipworks/forms.py index 8655ba8..29789ab 100644 --- a/membershipworks/forms.py +++ b/membershipworks/forms.py @@ -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: