Skip to content
Snippets Groups Projects
Commit 5e7aefd2 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Strip etherpad content before checking equality

parent cf3c2043
Branches
No related tags found
No related merge requests found
......@@ -151,9 +151,9 @@ def get_etherpad_text(pad):
def set_etherpad_text(pad, text, only_if_default=True):
if only_if_default:
current_text = get_etherpad_text(pad)
if (current_text != config.EMPTY_ETHERPAD
and len(current_text.strip()) > 0):
current_text = get_etherpad_text(pad).strip()
if (current_text != config.EMPTY_ETHERPAD.strip()
and len(current_text) > 0):
return False
file_like = BytesIO(text.encode("utf-8"))
files = {"file": file_like}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment