From 8682da66abd437a360852489fcfefe8b384f9c1f Mon Sep 17 00:00:00 2001 From: lombardofr Date: Sat, 23 Nov 2019 21:03:29 +0100 Subject: [PATCH] fix 885; fix 886 Change-Id: I73e490bda89478750d6cf123954eb9397a1d140e Signed-off-by: lombardofr --- projecthandler/views.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/projecthandler/views.py b/projecthandler/views.py index f36c7ab..fad83bd 100644 --- a/projecthandler/views.py +++ b/projecthandler/views.py @@ -58,7 +58,7 @@ def user_projects(request): user = osmutils.get_user(request) client = Client() result = client.project_list(user.get_token()) - return __response_handler(request,{ + return __response_handler(request, { 'projects': result['data'] if result and result['error'] is False else [], },'projectlist.html') @@ -75,8 +75,7 @@ def open_project(request): vnfd = client.vnfd_list(user.get_token()) ns = client.ns_list(user.get_token()) vnf = client.vnf_list(user.get_token()) - - proj_data_admin = prj['data']['_admin'] if prj and prj['data'] and prj['data']['_admin'] and prj['error'] is False else None + proj_data_admin = prj['data']['_admin'] if prj and prj['error'] is False and prj['data'] and prj['data']['_admin'] else None project_overview = { 'owner': user.username, 'name': user.project_name, @@ -132,9 +131,6 @@ def edit_project(request, project_id): return __response_handler(request, {}, url=None, status=200) - - - def __response_handler(request, data_res, url=None, to_redirect=None, *args, **kwargs): raw_content_types = request.META.get('HTTP_ACCEPT', '*/*').split(',') if 'application/json' in raw_content_types or url is None: -- 2.25.1