diff --git a/dist/plannersync b/dist/plannersync index 5e23620..5b78bf7 100755 Binary files a/dist/plannersync and b/dist/plannersync differ diff --git a/sync/service/recur.go b/sync/service/recur.go index 5df8a33..e2ab466 100644 --- a/sync/service/recur.go +++ b/sync/service/recur.go @@ -45,9 +45,10 @@ func (r *Recur) Recur() error { for _, i := range items { r.logger.Info("processing recurring item", "id", i.ID) // spawn instance + newRecurNext := item.FirstRecurAfter(i.Recurrer, i.RecurNext) newItem := i newItem.ID = uuid.New().String() - newItem.Date = i.RecurNext + newItem.Date = newRecurNext newItem.Recurrer = nil newItem.RecurNext = item.Date{} if err := r.repoSync.Update(newItem, time.Now()); err != nil { @@ -56,7 +57,7 @@ func (r *Recur) Recur() error { r.logger.Info("spawned instance", "newID", newItem.ID, "date", newItem.Date) // update recurrer - i.RecurNext = item.FirstRecurAfter(i.Recurrer, i.RecurNext) + i.RecurNext = newRecurNext if err := r.repoSync.Update(i, time.Now()); err != nil { return err }