Unable to set several due dates at once

Hello everyone,

I am currently working on a personal addon for Anki that aims to change the due date of specific cards to match a database. However, I have encountered an issue where not all the due dates are being changed, and the pattern seems somewhat random. I have noticed that when I delete and re-add the cards and modify the due date, some cards get updated with the new due date while others retain their previous due date. To provide more context, I have attached an example of my database and the results I am getting.

This is the result I’m trying to match:
image

This is what I’m getting:
image

In my addon, I am iterating through the cards in the Anki deck and retrieving the ID of each card. I then select the corresponding card from my SQLite database, retrieve the due date, and update the due date of that specific card using the function mw.col.sched.set_due_date([id], due_date).

I would greatly appreciate any advice or insight into why this issue might be occurring and how I can resolve it. Thank you in advance for your help.

Maybe something in your code is overriding the changes later on? Hard to tell without being able to try the code. Can you share a complete sample?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.