500 error on /api/procedures/{procurement_method}/auction/start_date
Fix error during get_auction_start_time call
[2021-02-08T11:19:36.919Z] | prozorro_sale.procedure.errors | ERROR - Unknown error caught in API - local variable 'end_time' referenced before assignment | X-Request-ID: 1b3a25a6-7037-4475-bfa8-c870b897180e
Traceback (most recent call last):
File "/procedure/prozorro_sale/procedure/errors.py", line 76, in request_errors_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 107, in context_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 113, in access_middleware
return await handler(request)
File "/procedure/prozorro_sale/procedure/utils.py", line 82, in accept_language_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/__init__.py", line 81, in retry_on_concurrency_error_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/__init__.py", line 45, in request_unpack_params
return await handler(request, **request.match_info)
File "/procedure/prozorro_sale/procedure/api.py", line 58, in get_auction_start_date_procedure
start_time = model_generator.get_auction_start_time(selling_method)
File "/procedure/prozorro_sale/procedure/model_generator.py", line 94, in get_auction_start_time
return end_time
UnboundLocalError: local variable 'end_time' referenced before assignment
Edited by dmitry.mashoshin