diff --git a/apps/participation/management/commands/fix_matrix_channels.py b/apps/participation/management/commands/fix_matrix_channels.py index 764b41e..ec7802b 100644 --- a/apps/participation/management/commands/fix_matrix_channels.py +++ b/apps/participation/management/commands/fix_matrix_channels.py @@ -16,10 +16,8 @@ class Command(BaseCommand): if not os.path.isfile(".matrix_avatar"): stat_file = os.stat("corres2math/static/logo.png") with open("corres2math/static/logo.png", "rb") as f: - resp, _ = Matrix.upload(f, filename="logo.png", content_type="image/png", - filesize=stat_file.st_size) - if not hasattr(resp, "content_uri"): - raise Exception(resp) + resp = Matrix.upload(f, filename="logo.png", content_type="image/png", + filesize=stat_file.st_size)[0][0] avatar_uri = resp.content_uri with open(".matrix_avatar", "w") as f: f.write(avatar_uri)