Skip to content

Commit

Permalink
chore: fix broken relation
Browse files Browse the repository at this point in the history
  • Loading branch information
halaprix committed May 23, 2024
1 parent 2ec541b commit 86be0e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions background-jobs/update-rays-cron-function/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,11 @@ async function checkMigrationEligibility(db: Kysely<Database>, positionPoints: P
.where('id', '=', point.eligibilityConditionId)
.execute()
} else if (positionInSnapshot.netValue > 0) {
await db
.updateTable('pointsDistribution')
.set({ eligibilityConditionId: null })
.where('id', '=', point.id)
.execute();
await db
.deleteFrom('eligibilityCondition')
.where('id', '=', point.eligibilityConditionId)
Expand Down

0 comments on commit 86be0e0

Please sign in to comment.