@@ -619,6 +619,9 @@ def payment_deleted(sender, instance, **kwargs):
member = instance.member
+ if member is None:
+ return
+
this_member_invoices = [i for i in member.invoices.filter(validated=True).order_by("date")]
this_member_payments = [p for p in member.payments.order_by("date")]