Skip to content

Commit

Permalink
🐛 fix prompt update in brains management settings tab
Browse files Browse the repository at this point in the history
  • Loading branch information
gozineb committed Nov 1, 2023
1 parent 2ffa0f3 commit aec1da8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { useToast } from "@/lib/hooks";
import { useUserData } from "@/lib/hooks/useUserData";
import { BrainStatus } from "@/lib/types/brainConfig";

import { useBrainFormState } from "./useBrainFormState";
import { validateOpenAIKey } from "../utils/validateOpenAIKey";
import { useBrainFormState } from "./useBrainFormState";

type UseSettingsTabProps = {
brainId: UUID;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit aec1da8

Please sign in to comment.