fix spawn first recurring instance
This commit is contained in:
parent
1944c67a4a
commit
b5715504be
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue