LLE ошибка при создании процедуры с неправильными данными bankAccounts
ERROR - Unknown error caught in API - 'str' object has no attribute 'get' | X-Request-ID: ee9e1677-9b4a-4063-ab0a-6e22ccc7fc0d
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 114, in access_middleware
return await check_access(handler)(request)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/auth/__init__.py", line 123, in handler
return await func(request, *args, **kwargs)
File "/procedure/prozorro_sale/procedure/utils.py", line 93, 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 67, in handler
return await func(request, *args, **kwargs)
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 "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/__init__.py", line 106, in handler
return await func(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/prozorro_sale/tools/__init__.py", line 67, in handler
return await func(request, *args, **kwargs)
File "/procedure/prozorro_sale/procedure/api.py", line 50, in create_procedure
procedure = model_generator.create_procedure(data, _id=blank._id, owner=user.name)
File "/procedure/prozorro_sale/procedure/model_generator.py", line 80, in create_procedure
proc = procType(data, **kwargs)
File "/procedure/prozorro_sale/procedure/models/base.py", line 60, in __init__
super().__init__(data, **kwargs)
File "/procedure/prozorro_sale/procedure/models/base.py", line 25, in __init__
super().__init__(data, **kwargs)
File "/usr/local/lib/python3.9/site-packages/schematics/models.py", line 112, in __init__
setattr(self, field, f_obj.validate(f_value, context))
File "/usr/local/lib/python3.9/site-packages/schematics/types/base.py", line 317, in validate
value = self.convert(value, context)
File "/usr/local/lib/python3.9/site-packages/schematics/types/compound.py", line 51, in convert
return self._convert(value, context)
File "/procedure/prozorro_sale/procedure/models/types.py", line 121, in _convert
data[key] = context.field_converter(self.field, item, context)
File "/usr/local/lib/python3.9/site-packages/schematics/transforms.py", line 388, in __call__
return self.func(*args)
File "/usr/local/lib/python3.9/site-packages/schematics/transforms.py", line 424, in validation_converter
return field.validate(value, context)
File "/usr/local/lib/python3.9/site-packages/schematics/types/base.py", line 317, in validate
value = self.convert(value, context)
File "/usr/local/lib/python3.9/site-packages/schematics/types/compound.py", line 51, in convert
return self._convert(value, context)
File "/usr/local/lib/python3.9/site-packages/schematics/types/compound.py", line 399, in _convert
model_class = self.find_model(value)
File "/usr/local/lib/python3.9/site-packages/schematics/types/compound.py", line 409, in find_model
kls = self.claim_function(self, data)
File "/procedure/prozorro_sale/procedure/packages/legitimatePropertyLease/utils.py", line 21, in legitimatePropertyLease_bankAccounts_claim_func
acc_type = data.get('accountType')
AttributeError: 'str' object has no attribute 'get'
Edited by Pavel Kuzmenko