diff --git a/.changeset/ninety-boats-jam.md b/.changeset/ninety-boats-jam.md new file mode 100644 index 0000000..b46f198 --- /dev/null +++ b/.changeset/ninety-boats-jam.md @@ -0,0 +1,5 @@ +--- +'@trustnxt/c2pa-ts': patch +--- + +Training and Data Mining assertion: Do not write empty constraint_info fields diff --git a/src/manifest/assertions/TrainingAndDataMiningAssertion.ts b/src/manifest/assertions/TrainingAndDataMiningAssertion.ts index 4772f90..8981172 100644 --- a/src/manifest/assertions/TrainingAndDataMiningAssertion.ts +++ b/src/manifest/assertions/TrainingAndDataMiningAssertion.ts @@ -62,8 +62,8 @@ export class TrainingAndDataMiningAssertion extends Assertion { for (const [key, entry] of Object.entries(this.entries)) { rawEntries[key] = { use: entry.choice, - constraint_info: entry.constraintInfo, }; + if (entry.constraintInfo) rawEntries[key].constraint_info = entry.constraintInfo; } const box = new CBORBox();