X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/d1ef1bf6cf243a1cc9bbb2df1baef252f0628de3..507752b933a466dd8e962c0e34d0ec74d6de55b7:/apps/wiki/forms.py?ds=inline 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():