Fix an incorrect rendering of m2a items templates (#16478)

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
This commit is contained in:
Andrii Trubai
2023-01-24 13:20:00 +02:00
committed by GitHub
parent b13efb61ef
commit ef12487f7f

View File

@@ -202,7 +202,7 @@ const fields = computed(() => {
for (const collection of relationInfo.value.allowedCollections) {
const displayFields: string[] = adjustFieldsForDisplays(
getFieldsFromTemplate(templates.value[collection.collection]),
relationInfo.value?.junctionCollection.collection ?? ''
collection.collection
).map((field) => `${relationInfo.value?.junctionField.field}:${collection.collection}.${field}`);
fields.push(...addRelatedPrimaryKeyToFields(collection.collection, displayFields));