Skip to content

Fix discord update username

Fixes the bug in the Discord server when updating usernames.

Also adds a new integration test case to prevent this kind of bug from going unnoticed again.

Example error log:

[Discord Service] update_username for user Leloriel_Falcon failed due to unexpected exception

Traceback (most recent call last):
  File "/home/allianceserver/venv/auth/lib/python3.8/site-packages/allianceauth/services/modules/discord/tasks.py", line 85, in _task_perform_user_action
    success = getattr(user.discord, method)(**kwargs)
  File "/home/allianceserver/venv/auth/lib/python3.8/site-packages/allianceauth/services/modules/discord/models.py", line 153, in update_username
    and 'user' in user_info
TypeError: argument of type 'GuildMember' is not iterable

Merge request reports

Loading