X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fprojectrequestview.py;h=6b1bc7c2ba3f8df4b5af808f193c57cbf1a96408;hb=bd150b7b61623c413ed354362bf3ea00da1a97d7;hp=aaa79b2f0ce29dc550c5f8a15e289fad4a167fc9;hpb=1d9a6983edf2136e2158980462a5170e430510fc;p=unfold.git diff --git a/portal/projectrequestview.py b/portal/projectrequestview.py index aaa79b2f..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): @@ -109,7 +111,7 @@ class ProjectRequestView(LoginRequiredAutoLogoutView, ThemeView): errors.append('Organization is mandatory') if (post['purpose'] is None or post['purpose'] == ''): - errors.append('Experiment purpose is mandatory') + errors.append('Project purpose is mandatory') if (re.search(r'^[A-Za-z0-9_]*$', post['project_name']) == None): errors.append('Project name may contain only letters, numbers, and underscore.') @@ -128,14 +130,14 @@ class ProjectRequestView(LoginRequiredAutoLogoutView, ThemeView): hrn = post['authority_hrn'] + '.' + post['project_name'] sfa_add_authority(wsgi_request, {'authority_hrn':hrn}) authority_add_pis(wsgi_request, hrn, user_hrn) - self.template_name = 'slice-request-done-view.html' + self.template_name = 'project-request-done-view.html' else: # Otherwise a wsgi_request is sent to the PI if 'join' in wsgi_request.POST: create_pending_join(wsgi_request, post) else: create_pending_project(wsgi_request, post) - self.template_name = 'slice-request-ack-view.html' + self.template_name = 'project-request-ack-view.html' # retrieves the pending projects creation list pending_projects = PendingProject.objects.all().filter(user_hrn=user_hrn)