Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPC-10000: Remove null from planEntityIds codec #204

Open
wants to merge 1 commit into
base: remove-null-support
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading