Commit 5e7aefd2 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Strip etherpad content before checking equality

parent cf3c2043
...@@ -151,9 +151,9 @@ def get_etherpad_text(pad): ...@@ -151,9 +151,9 @@ def get_etherpad_text(pad):
def set_etherpad_text(pad, text, only_if_default=True): def set_etherpad_text(pad, text, only_if_default=True):
if only_if_default: if only_if_default:
current_text = get_etherpad_text(pad) current_text = get_etherpad_text(pad).strip()
if (current_text != config.EMPTY_ETHERPAD if (current_text != config.EMPTY_ETHERPAD.strip()
and len(current_text.strip()) > 0): and len(current_text) > 0):
return False return False
file_like = BytesIO(text.encode("utf-8")) file_like = BytesIO(text.encode("utf-8"))
files = {"file": file_like} files = {"file": file_like}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment