diff --git a/membershipworks/models.py b/membershipworks/models.py index 4098eff..b599b59 100644 --- a/membershipworks/models.py +++ b/membershipworks/models.py @@ -556,6 +556,8 @@ class EventExt(Event): return reverse("membershipworks:event-detail", kwargs={"eid": self.eid}) def user_is_instructor(self, user: AbstractBaseUser) -> bool: + if self.instructor is None: + return False member = Member.from_user(user) if member is not None: return self.instructor.member == member diff --git a/membershipworks/templates/membershipworks/event_invoice.dj.html b/membershipworks/templates/membershipworks/event_invoice.dj.html index eda8c23..716a2cb 100644 --- a/membershipworks/templates/membershipworks/event_invoice.dj.html +++ b/membershipworks/templates/membershipworks/event_invoice.dj.html @@ -55,16 +55,22 @@