AndreasSko / go-jwlm

A command line tool to easily merge JW Library backups, written in Go.
MIT License
71 stars 3 forks source link

:bug: Skip UserMarks with no BlockRange attached #122

Closed AndreasSko closed 2 years ago

AndreasSko commented 2 years ago

The "duplicate" check for UserMarks is based on the collision check of the BlockRanges. So if no collision is detected for a duplicate marking, the duplicate itself will not be detected. This is an issue for UserMarks that don't have any associated BlockRanges: Duplicates won't be detected, which in the end results in a UNIQUE constraint failed: UserMark.UserMarkGuid error when exporting. This adds a check for markings that don't have any BlockRanges attached to them. They will be removed now, as they aren't useful anyway.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.1%) to 86.118% when pulling ad7b0b26e6803e7cbae95baa53024efc9b6c3c3e on fix_empty_blockranges into 37da106c58e6105b72869e573a96631536050509 on master.