+
+ # get the domain url
+ current_site = Site.objects.get_current()
+ current_site = current_site.domain
+
+ if theme.theme != 'fed4fire':
+ # getting the authority_hrn from the selected organization
+ for authority in authorities:
+ if authority['name'] == request.POST.get('org_name', ''):
+ authority_hrn = authority['authority_hrn']
+
+ # Handle the case when we use only hrn and not name
+ if authority_hrn is None:
+ authority_hrn = request.POST.get('org_name', '')
+
+ # Handle project if used
+ project = request.POST.get('project', None)
+ if project is not None and project != '':
+ authority_hrn = project
+
+ slice_name = request.POST.get('slice_name', '')
+ if not slice_name or len(slice_name) == 0 :
+ errors.append('Slice name can\'t be empty')
+
+ # accept only lowercase names
+ slice_name = slice_name.lower()
+