Closed vlad-ed-git closed 1 year ago
@vlad-ed-git Okay, will have a look. Full stack trace for bug reports please.
Getting 'list' object has no attribute 'where', from the contracts' data source. @clstaudt
Copy/paste the complete Python interpreter stack trace please 😄
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/Users/vlad/Desktop/vlad/tuttle/app/contracts/view.py", line 561, in
self.intent_handler.get_active_contracts()
calls is_active()
on each contract model and that's where an error occurs.
Contract: possible quick fix (can't code on iPad unfortunately) @vlad-ed-git
def is_active(self) -> bool:
if self.end_date:
today = datetime.date.today()
return self.end_date > today
else:
return True
Project.end_date cannot be None according to the model definition. So there is no bug in Project.is_active
Okay I will add this
On Friday, January 13, 2023, Christian Staudt @.***> wrote:
Project.end_date cannot be none as per the model definition. So there is no bug in Project.is_active
— Reply to this email directly, view it on GitHub https://github.com/tuttle-dev/tuttle/issues/134#issuecomment-1381489114, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJGBW67RGCIJFSVNZ3QOSBLWSEI4ZANCNFSM6AAAAAATZEVX7A . You are receiving this because you were mentioned.Message ID: @.***>
@clstaudt fixed
@clstaudt Contract model's implementation of the is_active method throws this error '>' not supported between instances of 'NoneType' and 'datetime.date'