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):
This commit is contained in:
Zineb El Bachiri 2023-11-01 13:45:40 +01:00 committed by GitHub
parent 2ffa0f3ff4
commit a81f3328c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,