X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fregistrationview.py;h=2ce1efaf70eec338dd433fa92b3b78a98f87bd00;hb=refs%2Fheads%2Ff4f-review;hp=d5d3b972f2da7ca69b90c9cd30c59bd7c710b002;hpb=aa013b53ba402e3e46625cf8443272aa5cdf5f57;p=myslice.git diff --git a/portal/registrationview.py b/portal/registrationview.py index d5d3b972..2ce1efaf 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -44,8 +44,12 @@ class RegistrationView (FreeAccessView, ThemeView): # REGISTRY ONLY TO BE REMOVED WITH MANIFOLD-V2 authorities_query = Query.get('authority').select('name', 'authority_hrn') authorities = execute_admin_query(wsgi_request, authorities_query) + print "RegistrationView authorities = ", authorities if authorities is not None: - 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']) print "############ BREAKPOINT 1 #################" # Page rendering @@ -80,12 +84,12 @@ class RegistrationView (FreeAccessView, ThemeView): 'current_site' : current_site, 'email_hash' : email_hash, 'pi' : '', - 'validation_link': 'http://' + current_site + '/portal/email_activation/'+ email_hash + 'validation_link': current_site + '/portal/email_activation/'+ email_hash } print "############ BREAKPOINT 4 #################" auth = wsgi_request.POST.get('org_name', None) - if auth is None: + if auth is None or auth == "": errors.append('Organization required: please select one or request its addition') else: