Bug 56753 - TypeError in resources.py / SetUserPreferences has no async post method
TypeError in resources.py / SetUserPreferences has no async post method
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM - REST API
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-5-errata
Assigned To: Florian Best
Christian Castens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-10-19 11:37 CEST by Johannes Königer
Modified: 2023-10-25 16:31 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Königer univentionstaff 2023-10-19 11:37:56 CEST
We see the following error in management-console-server.log during the Multiserver test job for a while now:

```
1 times in /var/log/univention/management-console-server.log:

https://jenkins2022.knut.univention.de/job/UCSschool-5.0/job/Install%20Multiserver/Config=s4,TestGroup=base1,UCSRelease=testing/ws/test/management-console-server.log

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/tornado/web.py", line 1595, in _execute
    result = yield result
  File "/usr/lib/python3/dist-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/usr/lib/python3/dist-packages/univention/management/console/resources.py", line 966, in post
    await p.post()
TypeError: object NoneType can't be used in 'await' expression
```

I guess this happens when the class `SetUserPreferences` is used, as it does not have an asynchronous `post` method.
Comment 1 Florian Best univentionstaff 2023-10-23 13:32:41 CEST
regression from git:1c169b5aad6508004a81a1fdd03da19460365142 Bug #56198.

This happens if univention.lib.umc.Client() from UCS 5.0-3 is used to set user preferences (e.g. favorites) against a UCS 5.0-4 based system.

univention-management-console.yaml
b016b22304c9 | fix(umc): fix setting user preferences e.g. favorites for old clients

univention-management-console (12.0.31-16)
b016b22304c9 | fix(umc): fix setting user preferences e.g. favorites for old clients
Comment 2 Christian Castens univentionstaff 2023-10-25 13:47:46 CEST
QA:
  - the traceback does no longer occur during the jenkins tests: OK
Comment 3 Iván.Delgado univentionstaff 2023-10-25 16:31:05 CEST
<https://errata.software-univention.de/#/?erratum=5.0x854>