juntagrico / juntagrico-billing

GNU Lesser General Public License v3.0
3 stars 2 forks source link

AttributeError at /jb/user_bill_pdf/1: 'NoneType' object has no attribute 'day' #42

Open pascalfree opened 3 months ago

pascalfree commented 3 months ago

This error shows up, when a member tries to open the PDF of a bill which has a payment without a payment date.

Suggestion

Make payment date a mandatory field or handle the case of a missing payment date here: https://github.com/juntagrico/juntagrico-billing/blob/b55f45d2b68e944a670c76cb8dc67f306c34f26b/juntagrico_billing/util/pdfbill.py#L197

samuel-iseli commented 3 months ago

I think making the paid_date field mandatory is the best solution. Don't know why it isn't already non-nullable. Will do it soon.