kerrickstaley / genanki

A Python 3 library for generating Anki decks
MIT License
2.06k stars 161 forks source link

Fix Anki not matching existing models correctly #116

Closed Commander-Cody closed 1 year ago

Commander-Cody commented 1 year ago

Before this change Anki did not match models correctly when updating a deck even when the model's ID didn't change.

Commander-Cody commented 1 year ago

Any chance this could be reviewed and hopefully merged? Is there anything else this PR should include?

kerrickstaley commented 1 year ago

Could you explain in more detail the bug that this PR fixes? What is the sequence of steps to reproduce the bug?

Also, if possible could you add a unit test that fails without this fix and passes with this fix?

Thanks for contributing!

Commander-Cody commented 1 year ago

I'm a bit embarassed to say that I can't reproduce it anymore. I had an issue where Anki created a new version of a deck's models on every re-import (I still have a "note:Vocabulary Model++++++++++++++++++++++" in Anki) and I could have sworn this fixed it but I guess the issue must have been something else then. Sorry!

kerrickstaley commented 1 year ago

If you find a repro, feel free to re-open!