Fix Member model method last_paid
The last_paid method used DoesNotExist exception to handle situation where no proper payment models were found. However, the syntax was wrong and it should have used Payment.DoesNotExist. This was fixed.
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ class Member(BaseMember):
|
||||
latest = payments.latest('date')
|
||||
date = latest.date
|
||||
return date
|
||||
except DoesNotExist:
|
||||
except Payment.DoesNotExist:
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user