Fix studio editing (#1668)

This commit is contained in:
InfiniteTF
2021-08-24 03:23:25 +02:00
committed by GitHub
parent 7b3b2ae9ba
commit 0d4ab7f6f3
5 changed files with 12 additions and 11 deletions

View File

@@ -30,7 +30,7 @@ import {
ImageInput,
} from "src/components/Shared";
import { useToast } from "src/hooks";
import { ImageUtils, FormUtils, TextUtils } from "src/utils";
import { ImageUtils, FormUtils, TextUtils, getStashIDs } from "src/utils";
import { MovieSelect } from "src/components/Shared/Select";
import { useFormik } from "formik";
import { Prompt } from "react-router";
@@ -110,10 +110,7 @@ export const SceneEditPanel: React.FC<IProps> = ({
}),
tag_ids: (scene.tags ?? []).map((t) => t.id),
cover_image: undefined,
stash_ids: (scene.stash_ids ?? []).map((s) => ({
stash_id: s.stash_id,
endpoint: s.endpoint,
})),
stash_ids: getStashIDs(scene.stash_ids),
};
type InputValues = typeof initialValues;