From 507752b933a466dd8e962c0e34d0ec74d6de55b7 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 28 Dec 2017 16:21:39 +0100 Subject: [PATCH 1/1] fix stupid bug on save --- apps/wiki/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(): -- 2.20.1