Registration: for Fibre using username corresponding to LDAP
[myslice.git] / portal / registrationview.py
index cf85725..c6dbd2a 100644 (file)
@@ -39,7 +39,7 @@ class RegistrationView (FreeAccessView, ThemeView):
         """
         """
         errors = []
-
+        authority_hrn = None
         authorities_query = Query.get('authority').select('name','authority_hrn')
         authorities = execute_admin_query(wsgi_request, authorities_query)
         if authorities is not None:
@@ -67,8 +67,8 @@ class RegistrationView (FreeAccessView, ThemeView):
                     authority_hrn = authority['authority_hrn']     
 
             # Handle the case when the template uses only hrn and not name
-            #if not authority_hrn:
-            authority_hrn = wsgi_request.POST.get('org_name', '')
+            if authority_hrn is None:
+                authority_hrn = wsgi_request.POST.get('org_name', '')
 
             post_email = wsgi_request.POST.get('email','').lower()
             salt = randint(1,100000)