fix error when no db

dev
Anton Franzluebbers 2022-09-11 22:58:10 -04:00
parent 7eb07fe5a1
commit ee8c26f42d
1 changed files with 2 additions and 1 deletions

View File

@ -322,6 +322,7 @@ def has_permission(data_block: dict, user_uuid: str) -> bool:
def replace_userid_with_name(data_block: dict):
if data_block['owner_id'] is not None:
user = get_user_dict(data_block['owner_id'])
if user is not None:
data_block['owner_name'] = user['username']
del data_block['owner_id']