Error on trying to serialize entry
[2021-04-21T11:09:13.250Z] | aiohttp.server | ERROR - Error handling request | X-Request-ID: 24727b7b-5c34-4b52-b740-2e455bab5fc9
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/local/lib/python3.8/site-packages/prozorro_sale/tools/logging.py", line 66, in request_id_middleware
response = await handler(request)
File "/usr/local/lib/python3.8/site-packages/prozorro_sale/auth/__init__.py", line 107, in context_middleware
return await handler(request)
File "/usr/local/lib/python3.8/site-packages/prozorro_sale/auth/__init__.py", line 123, in handler
return await func(request, *args, **kwargs)
File "/procedure_mirror/procedure_mirror/main.py", line 39, in websocket_handler
await request.app.mirror.sync_client(
File "/usr/local/lib/python3.8/site-packages/mongodb_mirror/mirror.py", line 56, in sync_client
timestamp = await self._initial_sync(client)
File "/usr/local/lib/python3.8/site-packages/mongodb_mirror/mirror.py", line 150, in _initial_sync
await client.upsert(None, self._serialize_document(doc, collection))
File "/procedure_mirror/procedure_mirror/main.py", line 16, in _serialize_document
migrated_data = _migrate(doc)
File "/usr/local/lib/python3.8/site-packages/prozorro_sale/procedure/migration.py", line 30, in _migrate
data = migration.apply(data)
File "/usr/local/lib/python3.8/site-packages/prozorro_sale/procedure/migrations/022_additionalClassifications_lease.py", line 3, in apply
for item in data['items'].values():
AttributeError: 'list' object has no attribute 'values'
Edited by Viacheslav Sukhovieiev