Fixed updating existing notes.
This commit is contained in:
parent
294afba2ac
commit
7f3ffc00f6
@ -72,16 +72,16 @@ def _importNotes(self):
|
|||||||
# note we have the added the guid
|
# note we have the added the guid
|
||||||
self._notes[note[GUID]] = (note[0], note[3], note[MID])
|
self._notes[note[GUID]] = (note[0], note[3], note[MID])
|
||||||
else:
|
else:
|
||||||
|
dupes += 1
|
||||||
|
|
||||||
# update existing note
|
# update existing note
|
||||||
newer = note[3] > mod
|
newer = note[3] > mod
|
||||||
if self.allowUpdate and self._mid(mid) == mid and newer:
|
if self.allowUpdate and self._mid(mid) == mid and newer:
|
||||||
localNid = self._notes[guid][0]
|
localNid = self._notes[note[GUID]][0]
|
||||||
note[0] = localNid
|
note[0] = localNid
|
||||||
note[4] = usn
|
note[4] = usn
|
||||||
add.append(note)
|
add.append(note)
|
||||||
dirty.append(note[0])
|
dirty.append(note[0])
|
||||||
else:
|
|
||||||
dupes += 1
|
|
||||||
|
|
||||||
if dupes:
|
if dupes:
|
||||||
self.log.append(_("Already in collection: %s.") % (ngettext(
|
self.log.append(_("Already in collection: %s.") % (ngettext(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user