X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fslicerequestview.py;h=95d2794b0a8e9d67f629ddfbe24e12dc9eabcb52;hb=7e8b243ba01f6ee786c44cf71a01963f936f67ea;hp=598aca3914f50e08b7aa09ed30d4f9c3ca5f0209;hpb=e17c4ff5fd80bb24573047eb832ea6ca5c2fc73e;p=myslice.git diff --git a/portal/slicerequestview.py b/portal/slicerequestview.py index 598aca39..95d2794b 100644 --- a/portal/slicerequestview.py +++ b/portal/slicerequestview.py @@ -35,6 +35,7 @@ class SliceRequestView (LoginRequiredAutoLogoutView, ThemeView): purpose='' exp_url='' authority_hrn = None + authority_name = None # Retrieve the list of authorities authorities_query = Query.get('authority').select('name', 'authority_hrn') authorities = execute_admin_query(wsgi_request, authorities_query) @@ -54,6 +55,9 @@ class SliceRequestView (LoginRequiredAutoLogoutView, ThemeView): if authority['authority_hrn'] == user_authority: authority_name = authority['name'] + # Handle the case when we use only hrn and not name + if authority_name is None: + authority_name = user_authority # account_query = Query().get('local:account').select('user_id','platform_id','auth_type','config') account_details = execute_query(wsgi_request, account_query) @@ -98,7 +102,7 @@ class SliceRequestView (LoginRequiredAutoLogoutView, ThemeView): if authority['name'] == wsgi_request.POST.get('org_name', ''): authority_hrn = authority['authority_hrn'] - # Handle the case when the template uses only hrn and not name + # Handle the case when we use only hrn and not name if authority_hrn is None: authority_hrn = wsgi_request.POST.get('org_name', '')