Skip to content

Commit

Permalink
Bugfix/importing bulk experiments (#857)
Browse files Browse the repository at this point in the history
* fixed issue coming in importing experiments in bulk

* resolve testcase fail
  • Loading branch information
Yagnik56 authored May 24, 2023
1 parent 6138511 commit 54ea501
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export class SegmentService {
// create/update segment document
segment.id = segment.id || uuid();
const { id, name, description, context, type } = segment;
const allSegments = await this.segmentRepository.getAllSegments(logger);
const allSegments = await this.getSegmentByIds(segment.subSegmentIds);
const subSegmentData = segment.subSegmentIds
.filter((subSegmentId) => {
// check if segment exists:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ describe('Segment Service Testing', () => {
it('should upsert a segment with no id', async () => {
const err = new Error('error');
const segment = new SegmentInputValidator();
segment.subSegmentIds = ['seg3'];
segment.subSegmentIds = ['seg1'];
segment.userIds = [];
segment.groups = [];
repo.findOne = jest.fn().mockResolvedValue(seg2);
Expand Down

0 comments on commit 54ea501

Please sign in to comment.