aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/resource_manager.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/wqflask/wqflask/resource_manager.py b/wqflask/wqflask/resource_manager.py
index 39a07310..14ff2183 100644
--- a/wqflask/wqflask/resource_manager.py
+++ b/wqflask/wqflask/resource_manager.py
@@ -25,16 +25,16 @@ def manage_resource():
group_masks_with_names = get_group_names(group_masks)
default_mask = resource_info['default_mask']['data']
owner_id = resource_info['owner_id']
- owner_info = get_user_by_unique_column("user_id", owner_id)
-
- if 'name' in owner_info:
- owner_display_name = owner_info['full_name']
- elif 'user_name' in owner_info:
- owner_display_name = owner_info['user_name']
- elif 'email_address' in owner_info:
- owner_display_name = owner_info['email_address']
- else:
- owner_display_name = None
+
+ owner_display_name = None
+ if owner_id != "none":
+ owner_info = get_user_by_unique_column("user_id", owner_id)
+ if 'name' in owner_info:
+ owner_display_name = owner_info['full_name']
+ elif 'user_name' in owner_info:
+ owner_display_name = owner_info['user_name']
+ elif 'email_address' in owner_info:
+ owner_display_name = owner_info['email_address']
return render_template("admin/manage_resource.html", owner_name = owner_display_name, resource_id = resource_id, resource_info=resource_info, default_mask=default_mask, group_masks=group_masks_with_names, admin_status=admin_status)