strip to test whether field is empty

This commit is contained in:
Arthur Milchior 2020-03-24 11:54:19 +01:00
parent 6143a7e218
commit 3799b8504f

View file

@ -496,9 +496,10 @@ class Editor:
return True
m = self.note.model()
for c, f in enumerate(self.note.fields):
f = f.replace("<br>", "").strip()
notChangedvalues = {"", "<br>"}
if previousNote and m["flds"][c]["sticky"]:
notChangedvalues.add(previousNote.fields[c])
notChangedvalues.add(previousNote.fields[c].replace("<br>", "").strip())
if f not in notChangedvalues:
return False
return True