X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/d1ef1bf6cf243a1cc9bbb2df1baef252f0628de3..45bec7a49efdc851db66b7fdb0207a9d465b615e:/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():