kerrickstaley / genanki

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

Add check that number of fields in model and note match #51

Closed kerrickstaley closed 4 years ago

kerrickstaley commented 4 years ago

Add a helper method to check that the number of fields in a Note matches the number of fields in its corresponding Model, and call it whenever we update .model or .fields on a Note, or when we call .write_to_db().

Helps with https://github.com/kerrickstaley/genanki/issues/50