Fix datun_id exception
Change-Id: Ifaf626de60c6f3722e49df60851efc348b1c64ce
This commit is contained in:
parent
6b2d8b73cb
commit
e44afd0595
|
@ -227,7 +227,7 @@ def service_get(request, environment_id, service_id):
|
|||
if instance:
|
||||
service_data = instance[0]
|
||||
if service_data['id'] == service_id:
|
||||
return service_data
|
||||
return bunch.bunchify(service_data)
|
||||
|
||||
|
||||
def check_for_services(request, environment_id):
|
||||
|
|
|
@ -76,7 +76,7 @@ class CommonPropertiesExtension(object):
|
|||
|
||||
class WizardFormADConfiguration(forms.Form, CommonPropertiesExtension):
|
||||
domain_name_re = re.compile(
|
||||
r'^[a-zA-Z0-9][a-zA-Z0-9.-]+[a-zA-Z0-9]$')
|
||||
r'^[a-zA-Z0-9][a-zA-Z0-9.-]*[a-zA-Z0-9]$')
|
||||
validate_domain_name = RegexValidator(domain_name_re,
|
||||
_(u'Enter a valid domain name: \
|
||||
just letters, numbers, dashes and \
|
||||
|
|
|
@ -32,20 +32,18 @@ class OverviewTab(tabs.Tab):
|
|||
service_data = self.tab_group.kwargs['service']
|
||||
|
||||
for id, name in STATUS_DISPLAY_CHOICES:
|
||||
if id == service_data[u'status']:
|
||||
if id == service_data.status:
|
||||
status_name = name
|
||||
|
||||
detail_info = {'service_name': service_data[u'name'],
|
||||
detail_info = {'service_name': service_data.name,
|
||||
'service_status': status_name,
|
||||
'service_type': service_data[u'service_type']}
|
||||
'service_type': service_data.service_type}
|
||||
|
||||
if not service_data[u'domain']:
|
||||
if not service_data.domain:
|
||||
detail_info['service_domain'] = 'Not in domain'
|
||||
|
||||
uri = service_data.get(u'uri')
|
||||
if uri:
|
||||
detail_info[u'uri'] = service_data[u'uri']
|
||||
|
||||
if hasattr(service_data, 'uri'):
|
||||
detail_info["uri"] = service_data.uri
|
||||
return detail_info
|
||||
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ class DetailServiceView(tabs.TabView):
|
|||
def get_context_data(self, **kwargs):
|
||||
context = super(DetailServiceView, self).get_context_data(**kwargs)
|
||||
context["service"] = self.get_data()
|
||||
context["service_name"] = self.service.get(u'name')
|
||||
context["service_name"] = self.service.name
|
||||
return context
|
||||
|
||||
def get_data(self):
|
||||
|
|
Loading…
Reference in New Issue