From a81f3328c88870df60afd06c9533f9d62a1d123a Mon Sep 17 00:00:00 2001 From: Zineb El Bachiri <100568984+gozineb@users.noreply.github.com> Date: Wed, 1 Nov 2023 13:45:40 +0100 Subject: [PATCH] fix: prompt update in brains management settings tab (#1543) # Description #1540 ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate): --- .../components/SettingsTab/hooks/useSettingsTab.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/hooks/useSettingsTab.ts b/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/hooks/useSettingsTab.ts index e2ef22c87..c98bfad76 100644 --- a/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/hooks/useSettingsTab.ts +++ b/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/hooks/useSettingsTab.ts @@ -258,7 +258,7 @@ export const useSettingsTab = ({ brainId }: UseSettingsTabProps) => { } if (dirtyFields["prompt"]) { - if (promptId === "") { + if (promptId === "" || promptId === undefined) { otherConfigs["prompt_id"] = ( await createPrompt({ title: prompt.title,