From f22cce95533557c6ddc6b81037d1ec0cb84b9f29 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:47:07 +0100 Subject: [PATCH 1/2] Saving pre filled relation picker doesnt work (#11928) * Make sure field state is valid * Skip non-object relationship links * Note --------- Co-authored-by: Adria Navarro --- .../src/components/app/forms/RelationshipField.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/client/src/components/app/forms/RelationshipField.svelte b/packages/client/src/components/app/forms/RelationshipField.svelte index bfa7c6cbd2..bb003730b3 100644 --- a/packages/client/src/components/app/forms/RelationshipField.svelte +++ b/packages/client/src/components/app/forms/RelationshipField.svelte @@ -60,6 +60,12 @@ // even if they are not in the inital fetch results initialValuesProcessed = true optionsObj = (fieldState?.value || []).reduce((accumulator, value) => { + // fieldState has to be an array of strings to be valid for an update + // therefore we cannot guarantee value will be an object + // https://linear.app/budibase/issue/BUDI-7577/refactor-the-relationshipfield-component-to-have-better-support-for + if (!value._id) { + return accumulator + } accumulator[value._id] = { _id: value._id, [primaryDisplay]: value.primaryDisplay, From ade8b8eec859f1769c7014e11cf0917e64a3fc40 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 29 Sep 2023 13:47:24 +0000 Subject: [PATCH 2/2] Bump version to 2.10.16-alpha.15 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 04ebf14448..6d08b39400 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.10.16-alpha.14", + "version": "2.10.16-alpha.15", "npmClient": "yarn", "packages": [ "packages/*"