From 69d6e4125444dad0034a7de0dcc2b9937d5a343f Mon Sep 17 00:00:00 2001 From: Marc Date: Fri, 17 Oct 2014 13:14:31 +0000 Subject: [PATCH] Fixes on domain backend --- orchestra/apps/domains/admin.py | 2 +- orchestra/apps/domains/backends.py | 4 ++-- orchestra/apps/orchestration/helpers.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/orchestra/apps/domains/admin.py b/orchestra/apps/domains/admin.py index 21abe500..9dc6fb39 100644 --- a/orchestra/apps/domains/admin.py +++ b/orchestra/apps/domains/admin.py @@ -39,7 +39,7 @@ class DomainInline(admin.TabularInline): extra = 0 verbose_name_plural = _("Subdomains") - domain_link = admin_link() + domain_link = admin_link('__unicode__') domain_link.short_description = _("Name") def has_add_permission(self, *args, **kwargs): diff --git a/orchestra/apps/domains/backends.py b/orchestra/apps/domains/backends.py index 1e50f900..1b542be1 100644 --- a/orchestra/apps/domains/backends.py +++ b/orchestra/apps/domains/backends.py @@ -49,8 +49,8 @@ class Bind9MasterDomainBackend(ServiceController): # These can never be top level domains return self.append(textwrap.dedent(""" - cat -s <(sed -e 's/^};/};\n/' named.conf.local) | \ - awk -v s="%(name)s" 'BEGIN { RS=""; s="zone \""s"\"" } $0!~s{ print $0"\n" }' \ + cat -s <(sed -e 's/^};/};\n/' named.conf.local) | \\ + awk -v s="%(name)s" 'BEGIN { RS=""; s="zone \""s"\"" } $0!~s{ print $0"\n" }' \\ > %(conf_path)s.tmp""" % context )) self.append('diff -I"^\s*//" %(conf_path)s.tmp %(conf_path)s || UPDATED=1' % context) diff --git a/orchestra/apps/orchestration/helpers.py b/orchestra/apps/orchestration/helpers.py index 01efb6b0..a232855c 100644 --- a/orchestra/apps/orchestration/helpers.py +++ b/orchestra/apps/orchestration/helpers.py @@ -44,7 +44,7 @@ def message_user(request, logs): errors = total-successes if total > 1: url = reverse('admin:orchestration_backendlog_changelist') - url += '?id__in=%s' ','.join(map(str, ids)) + url += '?id__in=%s' % ','.join(map(str, ids)) else: url = reverse('admin:orchestration_backendlog_change', args=ids) if errors: