X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=portal%2Fprojectrequestview.py;fp=portal%2Fprojectrequestview.py;h=6b1bc7c2ba3f8df4b5af808f193c57cbf1a96408;hb=bd150b7b61623c413ed354362bf3ea00da1a97d7;hp=8a48428263c80cb013f056b93b6e14e2f41bb1ac;hpb=56a406a324edea50be41bdd649319491fa391ca4;p=myslice.git diff --git a/portal/projectrequestview.py b/portal/projectrequestview.py index 8a484282..6b1bc7c2 100644 --- a/portal/projectrequestview.py +++ b/portal/projectrequestview.py @@ -20,8 +20,10 @@ class ProjectRequestView(LoginRequiredAutoLogoutView, ThemeView): authorities_query = Query.get('authority').select('name', 'authority_hrn') authorities = execute_admin_query(request, authorities_query) if authorities is not None: - authorities = sorted(authorities, key=lambda k: k['authority_hrn']) - authorities = sorted(authorities, key=lambda k: k['name']) + # Remove the root authority from the list + matching = [s for s in authorities if "." in s['authority_hrn']] + authorities = sorted(matching, key=lambda k: k['authority_hrn']) + authorities = sorted(matching, key=lambda k: k['name']) return authorities def getUserAuthority(self, request):