allow setting no last.fm username, closes #40

This commit is contained in:
andy 2022-08-14 19:32:24 +01:00
parent e35ee24b2d
commit 3fbeaa10d0

View File

@ -194,6 +194,9 @@ def user_route(auth=None, user=None):
logger.info(f'updating lastfm username {user.username} -> {request_json["lastfm_username"]}')
user.lastfm_username = request_json['lastfm_username']
if user.lastfm_username is None:
user.lastfm_username = ""
user.update()
logger.info(f'updated {user.username}')