fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d1ef1bf
)
fix stupid bug on save
author
Jan Szejko
<janek37@gmail.com>
Thu, 28 Dec 2017 15:21:39 +0000
(16:21 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Thu, 28 Dec 2017 15:21:39 +0000
(16:21 +0100)
apps/wiki/forms.py
patch
|
blob
|
history
diff --git
a/apps/wiki/forms.py
b/apps/wiki/forms.py
index
141f1b6
..
d526bfc
100644
(file)
--- 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', '')
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():
def save(self):
if self.user.is_authenticated():