From: Jan Szejko Date: Thu, 28 Dec 2017 15:21:39 +0000 (+0100) Subject: fix stupid bug on save X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/507752b933a466dd8e962c0e34d0ec74d6de55b7?ds=sidebyside;hp=d1ef1bf6cf243a1cc9bbb2df1baef252f0628de3 fix stupid bug on save --- diff --git a/apps/wiki/forms.py b/apps/wiki/forms.py index 141f1b6b..d526bfc6 100644 --- a/apps/wiki/forms.py +++ b/apps/wiki/forms.py @@ -82,7 +82,8 @@ class DocumentTextSaveForm(forms.Form): def clean_text(self): text = self.cleaned_data.get('text', '') - return remove_empty_elements(text) + # remove_empty_elements returns None on SyntaxError or when there's no change + return remove_empty_elements(text) or text def save(self): if self.user.is_authenticated():