mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
strip to test whether field is empty
This commit is contained in:
parent
6143a7e218
commit
3799b8504f
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue