From ef8898e4f90865a0627994bf5e674d5d706cea28 Mon Sep 17 00:00:00 2001 From: Nazar Kotjuk Date: Mon, 19 Oct 2015 12:34:43 +0300 Subject: [PATCH] fix --- article/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/article/forms.py b/article/forms.py index dee1d954..08f243a7 100644 --- a/article/forms.py +++ b/article/forms.py @@ -57,7 +57,9 @@ class BlogForm(forms.Form): article.author = author article.type = self.type - article.slug = data.get('slug') + if not getattr(article, 'slug', None): + article.slug = data['slug'] + if data['logo']: article.logo = data['logo'] article.publish_date = data['publish_date']