Skip to content

Commit

Permalink
Merge pull request #204 from UN-OCHA/HPC-10000
Browse files Browse the repository at this point in the history
HPC-10000: Remove `null` from `planEntityIds` codec
  • Loading branch information
enxtur authored Jan 23, 2025
2 parents 543ff9e + 26ad1f2 commit 829a54f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unocha/hpc-api-core",
"version": "10.8.0",
"version": "10.8.1",
"description": "Core libraries supporting HPC.Tools API Backend",
"license": "Apache-2.0",
"private": false,
Expand Down
8 changes: 1 addition & 7 deletions src/db/models/planEntityVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ export const PLAN_ENTITY_VERSION_ID = brandedType<number, PlanEntityVersionId>(
);

const PLAN_ENTITY_VERSION_REF = t.partial({
/**
* TODO: Some values in the database seem to have null values in this
* array, which is problematic. We need to have stricter validation of
* data being stored here, repair existing values, and then remove null
* from this type
*/
planEntityIds: t.array(t.union([t.null, PLAN_ENTITY_ID])),
planEntityIds: t.array(PLAN_ENTITY_ID),
entityPrototypeId: ENTITY_PROTOTYPE_ID,
});

Expand Down

0 comments on commit 829a54f

Please sign in to comment.