diff --git a/dist/plannersync b/dist/plannersync index a42e037..c31a3d7 100755 Binary files a/dist/plannersync and b/dist/plannersync differ diff --git a/sync/service/recur.go b/sync/service/recur.go index f70fb0e..cae5551 100644 --- a/sync/service/recur.go +++ b/sync/service/recur.go @@ -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 diff --git a/sync/service/recur_test.go b/sync/service/recur_test.go index 62534be..2581212 100644 --- a/sync/service/recur_test.go +++ b/sync/service/recur_test.go @@ -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