fixed levels of some error messages, should work now

This commit is contained in:
Thomas Waldmann 2013-11-06 01:30:06 +01:00
parent e924b054fe
commit 1072b7ccf0

View File

@ -167,11 +167,9 @@ class OverviewView(CreateView):
try: try:
dnstools.add(self.object.get_fqdn(), self.request.META['REMOTE_ADDR'], origin=self.object.domain.domain) dnstools.add(self.object.get_fqdn(), self.request.META['REMOTE_ADDR'], origin=self.object.domain.domain)
except dnstools.Timeout: except dnstools.Timeout:
# XXX should be ERROR, but ERROR is white on web ui!? success, level, msg = False, messages.ERROR, 'Timeout - communicating to name server failed.'
success, level, msg = False, messages.WARNING, 'Timeout - communicating to name server failed.'
except dnstools.NameServerNotAvailable: except dnstools.NameServerNotAvailable:
# XXX should be ERROR, but ERROR is white on web ui!? success, level, msg = False, messages.ERROR, 'Name server unavailable.'
success, level, msg = False, messages.WARNING, 'Name server unavailable.'
else: else:
self.object.created_by = self.request.user self.object.created_by = self.request.user
self.object.save() self.object.save()