aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/metadata_edits.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py
index 5468fe9b..4b960072 100644
--- a/wqflask/wqflask/metadata_edits.py
+++ b/wqflask/wqflask/metadata_edits.py
@@ -62,13 +62,16 @@ def _get_diffs(
):
def __get_file_metadata(file_name: str) -> Dict:
author, resource_id, time_stamp, *_ = file_name.split(".")
-
+ try:
+ author = json.loads(redis_conn.hget("users", author)).get(
+ "full_name"
+ )
+ except (AttributeError, TypeError):
+ author = author
return {
"resource_id": resource_id,
"file_name": file_name,
- "author": json.loads(redis_conn.hget("users", author)).get(
- "full_name"
- ),
+ "author": author,
"time_stamp": time_stamp,
"roles": get_highest_user_access_role(
resource_id=resource_id,