Missing identity_id key in set_user_account (userprofile) #315
Labels
accepted
This issue was accepted, we will work on this at some point
bug
Something isn't working
pending review
Describe the bug
Since the latest update we've noticed Error messages after changing users that where created before the latest update.
{"@timestamp": "2025-02-06 15:51:12,505", "event": { "module": "assemblyline", "dataset": "assemblyline_ui" }, "host": { "ip": "" "hostname": "279d60e80c8b" }, "log": { "level": "ERROR", "logger": "assemblyline_ui" }, "process": { "pid": "758" }, "message": "Exception on /api/v4/user// [POST]\nTraceback (most recent call last):\n File "/var/lib/assemblyline/.local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app\n response = self.full_dispatch_request()\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/var/lib/assemblyline/.local/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request\n rv = self.handle_user_exception(e)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/var/lib/assemblyline/.local/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request\n rv = self.dispatch_request()\n ^^^^^^^^^^^^^^^^^^^^^^^\n File "/var/lib/assemblyline/.local/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request\n return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/var/lib/assemblyline/.local/lib/python3.11/site-packages/assemblyline_ui/api/base.py", line 237, in base\n return func(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^\n File "/var/lib/assemblyline/.local/lib/python3.11/site-packages/assemblyline_ui/api/v4/user.py", line 528, in set_user_account\n data.pop('identity_id')\nKeyError: 'identity_id'\n"}
Seems like things have been changed on the identity_id part.
To Reproduce
Running version 4.5.0.x (before version 4.5.0.70)
Expected behavior
Account should be updated and missing identity_id field should be updated in the background.
Environment (please complete the following information if pertinent):
The text was updated successfully, but these errors were encountered: