Skip to content

Commit

Permalink
fix: recursive expand parents
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdh committed Aug 7, 2023
1 parent ce0b6fe commit f81f04a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/receiver/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (s *Service) ExpandParents(ctx context.Context, rcvs []Receiver) ([]Receive
uniqueParentIDs = append(uniqueParentIDs, k)
}

parentReceivers, err := s.List(ctx, Filter{ReceiverIDs: uniqueParentIDs, Expanded: true})
parentReceivers, err := s.List(ctx, Filter{ReceiverIDs: uniqueParentIDs, Expanded: false})
if err != nil {
return nil, fmt.Errorf("failure when expanding receiver parents: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion core/receiver/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ func TestService_ExpandParents(t *testing.T) {
Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver, sc *mocks.ConfigResolver) {
rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), receiver.Filter{
ReceiverIDs: []uint64{1, 2},
Expanded: true,
Expanded: false,
}).Return([]receiver.Receiver{
{
ID: 1,
Expand Down

0 comments on commit f81f04a

Please sign in to comment.