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:
henu
2017-05-25 17:00:31 +03:00
parent bff2dd2b76
commit 90177ab9fc
+1 -1
View File
@@ -103,7 +103,7 @@ class Member(BaseMember):
latest = payments.latest('date')
date = latest.date
return date
except DoesNotExist:
except Payment.DoesNotExist:
return None
@staticmethod