fix spawn first recurring instance

This commit is contained in:
Erik Winter 2025-01-05 15:39:18 +01:00
parent 1944c67a4a
commit b5715504be
3 changed files with 3 additions and 3 deletions

BIN
dist/plannersync vendored

Binary file not shown.

View File

@ -49,7 +49,7 @@ func (r *Recur) Recur(until item.Date) error {
r.logger.Info("found recurring items", "count", len(items))
for _, i := range items {
r.logger.Info("processing recurring item", "id", i.ID)
newRecurNext := item.FirstRecurAfter(i.Recurrer, i.RecurNext)
newRecurNext := i.RecurNext
for {
// spawn instance

View File

@ -44,8 +44,8 @@ func TestRecur(t *testing.T) {
t.Errorf("failed to get updated items: %v", err)
}
if len(items) != 4 { // Original + 3 new instances
t.Errorf("expected 2 items, got %d", len(items))
if len(items) != 5 { // Original + 4 new instances
t.Errorf("expected 5 items, got %d", len(items))
}
// Check that RecurNext was updated