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,