From aa11b19609e2d8c2590405ae12feaea9f83dcd5f Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Sat, 29 Jan 2022 17:26:05 +0100 Subject: [PATCH] fix: Fix link Model-Relation --- resources/js/Components/Pages/RecordsPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/Components/Pages/RecordsPage.tsx b/resources/js/Components/Pages/RecordsPage.tsx index a35020eec..08ddd1960 100644 --- a/resources/js/Components/Pages/RecordsPage.tsx +++ b/resources/js/Components/Pages/RecordsPage.tsx @@ -393,8 +393,8 @@ export class RecordsPage extends Page { // Save relations for (const [relation, relatedModel] of Object.entries(relations)) { const response = await relatedModel.save(); - if (response.getModelId) { - model.setRelation(relation, response.getModelId()); + if (response.getModelId()) { + model.setRelation(relation, response.getModel()); } }