snikket-im / snikket-web-portal

This is the web portal for Snikket Chat services. To learn more about what Snikket Chat services are, check the website.
https://snikket.org
GNU Affero General Public License v3.0
32 stars 12 forks source link

KeyError in circle and users views related to a newly added user #180

Closed horazont closed 5 months ago

horazont commented 6 months ago
snikket-portal    | Traceback (most recent call last):
snikket-portal    |   File "/usr/lib/python3/dist-packages/quart/app.py", line 1673, in full_dispatch_request
snikket-portal    |     result = await self.dispatch_request(request_context)
snikket-portal    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
snikket-portal    |   File "/usr/lib/python3/dist-packages/quart/app.py", line 1718, in dispatch_request
snikket-portal    |     return await self.ensure_async(handler)(**request_.view_args)
snikket-portal    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
snikket-portal    |   File "/opt/snikket-web-portal/snikket_web/prosodyclient.py", line 499, in wrapped
snikket-portal    |     return await f(*args, **kwargs)
snikket-portal    |            ^^^^^^^^^^^^^^^^^^^^^^^^
snikket-portal    |   File "/opt/snikket-web-portal/snikket_web/prosodyclient.py", line 523, in wrapped
snikket-portal    |     return await f(*args, **kwargs)
snikket-portal    |            ^^^^^^^^^^^^^^^^^^^^^^^^
snikket-portal    |   File "/opt/snikket-web-portal/snikket_web/admin.py", line 518, in edit_circle
snikket-portal    |     for user in await client.list_users()
snikket-portal    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
snikket-portal    |   File "/opt/snikket-web-portal/snikket_web/prosodyclient.py", line 330, in wrapper
snikket-portal    |     return (await f(self, *args, session=session, **kwargs))
snikket-portal    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
snikket-portal    |   File "/opt/snikket-web-portal/snikket_web/prosodyclient.py", line 949, in list_users 
snikket-portal    |     result.append(AdminUserInfo.from_api_response(user))
snikket-portal    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
snikket-portal    |   File "/opt/snikket-web-portal/snikket_web/prosodyclient.py", line 134, in from_api_response
snikket-portal    |     avatar_info=[
snikket-portal    |                 ^
snikket-portal    |   File "/opt/snikket-web-portal/snikket_web/prosodyclient.py", line 135, in <listcomp> 
snikket-portal    |     AvatarMetadata.from_api_response(avatar_info)
snikket-portal    |   File "/opt/snikket-web-portal/snikket_web/prosodyclient.py", line 86, in from_api_response
snikket-portal    |     type=data["type"],
snikket-portal    |          ~~~~^^^^^^^^
snikket-portal    | KeyError: 'type'