Skip to content

Commit

Permalink
Trying fix for python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IR96334 committed Nov 28, 2024
1 parent f2ff99f commit 9604ff1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion backend/src/services/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ export async function updateRelease(user: UserInterface, modelId: string, semver
})
}

const updatedRelease = await Release.findOneAndUpdate({ modelId, semver }, { $set: release })
const updatedRelease = await Release.findOneAndUpdate(
{ modelId, semver: semverStringToObject(semver) },
{ $set: release },
)

if (!updatedRelease) {
throw NotFound(`The requested release was not found.`, { modelId, semver })
Expand Down
1 change: 0 additions & 1 deletion backend/test/services/release.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ describe('services > release', () => {
expect(releaseModelMocks.sort.mock.calls.at(0)).toMatchSnapshot()
expect(releaseModelMocks.lookup.mock.calls.at(0)).toMatchSnapshot()
expect(releaseModelMocks.append.mock.calls.at(0)).toMatchSnapshot()
// expect(releaseModelMocks.lookup.mock.calls.at(0)).toMatchSnapshot()
})

//test good - give good semver range with lower and upper bounds, returns valid query
Expand Down

0 comments on commit 9604ff1

Please sign in to comment.