Skip to content

Commit

Permalink
fix: add association qualifiers only to non-TRAPI resources while rev…
Browse files Browse the repository at this point in the history
…ersing records
  • Loading branch information
NeuralFlux committed Oct 2, 2024
1 parent 38811c0 commit 9a80e48
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ export class Record {
frozen.association.predicate,
);
reversedAPIEdge.predicate = predicate;

// we need association qualifiers for non-TRAPI resources only
if (this.association.smartapi.meta.has_metakg) {
// use `has_metakg` as a filter for TRAPI resources
reversedAPIEdge.qualifiers = this.qualifiers;
}

if (reversedAPIEdge.qualifiers) {
const reversedQualifiers = Object.fromEntries(
Object.entries(reversedAPIEdge.qualifiers).map(
Expand Down

0 comments on commit 9a80e48

Please sign in to comment.