X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/d1ef1bf6cf243a1cc9bbb2df1baef252f0628de3..a802a933f53625f732e9d3807b4162e770c8aaf1:/apps/wiki/forms.py 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():