From: lombardofr Date: Sat, 23 Nov 2019 20:03:29 +0000 (+0100) Subject: fix 885; fix 886 X-Git-Tag: v7.0.0rc1~6 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F25%2F8225%2F1;p=osm%2FLW-UI.git fix 885; fix 886 Change-Id: I73e490bda89478750d6cf123954eb9397a1d140e Signed-off-by: lombardofr --- 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: