Negative lesson count

Noticed this morning that lesson count was off, only showing 1 lesson after adding 3 cards to the deck. Assumed problem was with the cards I’d added. Lesson count dropped to -1 after deleting the two cards I thought were causing the issue. And then went back to 1 after re-adding them.

Deleted a few hibernated cards and lesson count has now dropped to -10! As expected, I’ve only made the problem worse rather than fix it.

Not sure if this is another case of: Negative Lessons and -1 Index on All Cards ?

Sorry for the hassle, any help much appreciated!

1 Like

I’ve reworked the backend with the latest update, which also included the hibernating/filtering and counting system. I’ll go check your account to see what is going on.

Sorry about the inconvenience, I’ll get it fixed asap.

1 Like

@Sparev I’ve tracked down the problem. Apparently you had two progress documents for only one card (not sure how that happened…) and deleting cards was not deleting the reference to hibernated cards, so the count was off.

I’ve fixed both issues for you and deployed a hotfix to prevent this from happening to anyone else. I’ll try to track down where the duplicate progress came from. Could be from a bug that has been fixed already by now though.

Thanks for reporting, glad we catched the bug quickly this way!


So appreciate you getting to that as quick as you did!

This could be a total wild goose chase, but think I had a kanji deck previously that I deleted and remade. Uninspired as I am it may have even had the same name, I can’t quite remember… Some of the cards would of been for the same kanji. Could be part of why there’s two progress documents for one card?

I’m no expert with this stuff in the least so no idea if that’s useful info.

Thanks again!

1 Like

I think those would be unrelated as everything is ID bound. I did investigate further a while ago and saw that it was due to four api calls being done at the exact same moment. So I think something in the frontend is going wrong during lessons.

Thanks for mentioning though!

Please let me know if anything else seems off, it was a very large rework. I’ve tested it quite a lot but as you can see sometimes a bug manages to sneak it’s way through regardless :sweat_smile:

1 Like

Figured it probably wouldn’t be so simple a solution!

As of now it’s all working perfectly as far as I can tell, new cards added with no issue, lesson count is behaving. Will keep an eye out though. :eyes:

Appreciate all your hard work!

1 Like