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

kie-issues#954: Extended Services Runner erases data on dates with Decision Update #2168

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Changes from 2 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
11 changes: 11 additions & 0 deletions packages/dmn-runner/src/jsonSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ export function removeChangedPropertiesAndAdditionalProperties<T extends Validat
return;
}

// uniforms-patternfly saves the DateTimeField component value as a Date object and
// AJV handles data-time as a string, causing an error with keyword type.
// Also, the ajv.ErrorObject doesn't correctly type the parentSchema property
if (
error.keyword === "type" &&
(error.parentSchema as any)?.format === "date-time" &&
jomarko marked this conversation as resolved.
Show resolved Hide resolved
error.data instanceof Date
) {
return;
}

const pathList = error.dataPath
.replace(/\['([^']+)'\]/g, "$1")
.replace(/\[(\d+)\]/g, ".$1")
Expand Down
Loading