AttributeError: 'datetime.timedelta' object has no attribute 'years
2022-01-05 09:29:17 1 time sandbox
prozorro-sandbox-protocol-api
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/errors.py", line 48, in handler
return await func(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/errors.py", line 108, in _catch_error_middleware
return await handler(request, *args, **kwargs)
File "/protocol_service/prozorro_sale/protocol_service/api.py", line 71, in get_protocol_html
body=builder.protocol_html(),
File "/protocol_service/prozorro_sale/protocol_service/protocol_builder.py", line 74, in protocol_html
return self.template_builder.from_string(self.get_template()).render(
File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 1291, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 1, in top-level template code
File "/protocol_service/prozorro_sale/protocol_service/templates/base/base.html", line 72, in top-level template code
{% block main_content %}
File "<template>", line 65, in block 'main_content'
File "/protocol_service/prozorro_sale/protocol_service/utils.py", line 116, in parse_duration
if dur.years:
AttributeError: 'datetime.timedelta' object has no attribute 'years'```
Edited by Ghost User