fix 885; fix 886 25/8225/1
authorlombardofr <lombardo@everyup.it>
Sat, 23 Nov 2019 20:03:29 +0000 (21:03 +0100)
committerlombardofr <lombardo@everyup.it>
Sat, 23 Nov 2019 20:03:29 +0000 (21:03 +0100)
Change-Id: I73e490bda89478750d6cf123954eb9397a1d140e
Signed-off-by: lombardofr <lombardo@everyup.it>
projecthandler/views.py

index f36c7ab..fad83bd 100644 (file)
@@ -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: