The source project of this merge request has been removed.
fix(subsonic): AttributeError when getting user profile
This Merge Request includes:
-
Tests -
A changelog fragment (cf https://docs.funkwhale.audio/contributing.html#changelog-management)
The getUser
API is trying to render a list of ints like <folder>1</folder>
, but dict_to_xml_tree wasn't
designed for that. Extends it a little bit to support that use case.
AttributeError: 'int' object has no attribute 'items'
for key, value in d.items():
File "/srv/funkwhale/api/funkwhale_api/subsonic/renderers.py", line 73, in dict_to_xml_tree
root.append(dict_to_xml_tree(key, obj, parent=root))
File "/srv/funkwhale/api/funkwhale_api/subsonic/renderers.py", line 78, in dict_to_xml_tree
root.append(dict_to_xml_tree(key, value, parent=root))
File "/srv/funkwhale/api/funkwhale_api/subsonic/renderers.py", line 75, in dict_to_xml_tree
tree = dict_to_xml_tree("subsonic-response", final)
File "/srv/funkwhale/api/funkwhale_api/subsonic/renderers.py", line 65, in render
ret = renderer.render(self.data, accepted_media_type, context)