Skip to content

Commit

Permalink
Update seeder to prevent duplicate key issue `duplicate key value vio…
Browse files Browse the repository at this point in the history
…lates unique constraint "points_external_id_unique"`
  • Loading branch information
Jozzey committed Sep 25, 2024
1 parent 469f5bf commit 8d5aec0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/support/seeders/requirements-for-returns.seeder.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ async function seed () {
returnVersion.id,
'week',
false,
1234,
false,
'I have an alias'
)
Expand All @@ -58,7 +57,6 @@ async function seed () {
returnVersion.id,
'month',
true,
4321,
true,
null
)
Expand All @@ -71,7 +69,6 @@ async function _returnRequirement (
returnVersionId,
reportingFrequency,
summer,
naldPointId,
agreements,
alias
) {
Expand All @@ -89,7 +86,7 @@ async function _returnRequirement (

const { id: returnRequirementId } = returnRequirement

const point = await PointHelper.add({ externalId: `9:${naldPointId}` })
const point = await PointHelper.add()

await ReturnRequirementPointHelper.add({ pointId: point.id, returnRequirementId })

Expand Down

0 comments on commit 8d5aec0

Please sign in to comment.