From 4ec3a300b0e9b61e4604f0e89ee82af3b47a9a4c Mon Sep 17 00:00:00 2001 From: Alexander Burdeiny Date: Mon, 4 Jul 2016 15:11:40 +0300 Subject: [PATCH] =?UTF-8?q?1384:=20=D0=AD=D1=82=D0=B0=D0=BF=20=E2=84=964?= =?UTF-8?q?=20-=20=D0=98=D0=BC=D1=8F=20URLa=20=D0=B2=D1=8B=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D0=B2=D0=BA=D0=B8:=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- redirects/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/redirects/admin.py b/redirects/admin.py index 8a6510c3..0fa4c0ac 100644 --- a/redirects/admin.py +++ b/redirects/admin.py @@ -46,7 +46,9 @@ class NewUrlForObject(AjaxableResponseMixin, UpdateView): slug_field = 'url' def get_initial(self): - new_url = translit_with_separator(self.object.name.strip()).lower() + new_url = None + if self.object.name: + new_url = translit_with_separator(self.object.name.strip()).lower() return { 'old_url': self.object.url, 'new_url': new_url,