Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #378 from beabee-communityrm/fix/missing-callout-v…
Browse files Browse the repository at this point in the history
…ariant

fix: add missing default variant when loading callout
  • Loading branch information
wpf500 authored Mar 15, 2024
2 parents cec8dd8 + 98f1877 commit f5a2264
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/api/transformers/CalloutResponseTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ export class CalloutResponseTransformer extends BaseCalloutResponseTransformer<
}
if (query.with?.includes(GetCalloutResponseWith.Callout)) {
qb.innerJoinAndSelect(`${fieldPrefix}callout`, "callout");
qb.innerJoinAndSelect(
"callout.variants",
"variant",
"variant.name = 'default'"
);
}
if (query.with?.includes(GetCalloutResponseWith.Contact)) {
qb.leftJoinAndSelect(`${fieldPrefix}contact`, "contact");
Expand Down

0 comments on commit f5a2264

Please sign in to comment.