Skip to content

Commit

Permalink
fix: staging delete endpoint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Feb 7, 2022
1 parent c62c092 commit 9a78b7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/data-assertions.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export const assertUnitRecordExists = async (
};

export const assertStagingRecordExists = async (stagingId) => {
const record = await Staging.findByPk(stagingId);
const record = await Staging.findOne({ where: { uuid: stagingId } });

if (!record) {
throw new Error(
`The staging record for the staging ID: ${stagingId} does not exist.`,
Expand Down

0 comments on commit 9a78b7c

Please sign in to comment.