CDB3-4659 500 error while patching "previousAuctionId" field
STR:
1.Create procedure
2.Try to patch with body attached patch_previousAuctionId.txt
AR:
500 error
ER:
procedure successfully patched
[2023-05-04T09:29:01.559Z] | prozorro_sale.procedure.errors | ERROR - Unknown error caught in API - ["Object with auction id LAE001-UA-20220125-48292 was not found"] | PROCEDURE-ID: 645379f946953f66056a620e | X-Request-ID: 72C77F000001A0427F000001005064537ADDAE4AC40C5
Traceback (most recent call last):
File "/procedure/prozorro_sale/procedure/errors.py", line 122, in request_errors_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 269, in context_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 286, in access_middleware
return await check_access(handler)(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 312, in handler
return await func(request, *args, **kwargs)
File "/procedure/prozorro_sale/procedure/utils.py", line 158, in accept_language_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/__init__.py", line 90, in retry_on_concurrency_error_middleware
return await handler(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/__init__.py", line 72, in handler
return await func(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/middlewares.py", line 49, in request_unpack_params
return await handler(request, *args, **request.match_info, **kwargs)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/errors.py", line 67, in handler
return await func(request, *args, **kwargs)
File "/procedure/prozorro_sale/procedure/utils.py", line 103, in handler
res = await func(request, *args, **kwargs)
File "/procedure/prozorro_sale/procedure/api.py", line 170, in update_procedure
procedure.update_procedure(data, request._context)
File "/procedure/prozorro_sale/procedure/roles.py", line 25, in handler
return func(*args, **kwargs)
File "/procedure/prozorro_sale/procedure/packages/landArrested/states.py", line 693, in update_procedure
self.procedure.import_data(raw_data=data, role='owner', app_data={'procedure_status': self.procedure.status})
File "/procedure/prozorro_sale/procedure/models/base.py", line 47, in import_data
import_data = super().import_data(raw_data, role, **kwargs)
File "/usr/local/lib/python3.9/site-packages/schematics/models.py", line 173, in import_data
return convert(self.__class__, self, raw_data, role=role, **kwargs)
File "/usr/local/lib/python3.9/site-packages/schematics/transforms.py", line 461, in convert
return import_loop(cls, mutable, raw_data, validation_converter, **kwargs)
File "/usr/local/lib/python3.9/site-packages/schematics/transforms.py", line 200, in import_loop
setattr(mutable, field_name, value)
File "/usr/local/lib/python3.9/site-packages/schematics/models.py", line 34, in _setter
getattr(self, pre_set_callback_name)(value)
File "/procedure/prozorro_sale/procedure/packages/landArrested/procedure.py", line 560, in _on_previousAuctionId_set
raise ValidationError(f'Object with auction id {value} was not found')
schematics.exceptions.ValidationError: ["Object with auction id LAE001-UA-20220125-48292 was not found"]
Edited by Yuriy Bilinsky