Skip to content

Commit

Permalink
Merge pull request #167 from TrustNXT/bugfix/tdm-empty-constraintinfo
Browse files Browse the repository at this point in the history
Training and Data Mining assertion: Do not write empty constraint_info fields
  • Loading branch information
cyraxx authored Nov 12, 2024
2 parents db8aefa + cf0a06a commit ff3910a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ninety-boats-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@trustnxt/c2pa-ts': patch
---

Training and Data Mining assertion: Do not write empty constraint_info fields
2 changes: 1 addition & 1 deletion src/manifest/assertions/TrainingAndDataMiningAssertion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ff3910a

Please sign in to comment.