mirror of
https://github.com/stashapp/stash.git
synced 2026-01-12 11:12:37 +01:00
Fix yup schemas (#3445)
This commit is contained in:
parent
bd747317d4
commit
4e34de4c1e
3 changed files with 9 additions and 7 deletions
|
|
@ -127,7 +127,7 @@ export const PerformerEditPanel: React.FC<IPerformerDetails> = ({
|
|||
twitter: yup.string().optional(),
|
||||
instagram: yup.string().optional(),
|
||||
tag_ids: yup.array(yup.string().required()).optional(),
|
||||
stash_ids: yup.mixed<GQL.StashIdInput>().optional(),
|
||||
stash_ids: yup.mixed<GQL.StashIdInput[]>().optional(),
|
||||
image: yup.string().optional().nullable(),
|
||||
details: yup.string().optional(),
|
||||
death_date: yup.string().optional(),
|
||||
|
|
|
|||
|
|
@ -124,15 +124,17 @@ export const SceneEditPanel: React.FC<IProps> = ({
|
|||
studio_id: yup.string().optional().nullable(),
|
||||
performer_ids: yup.array(yup.string().required()).optional().nullable(),
|
||||
movies: yup
|
||||
.object({
|
||||
movie_id: yup.string().required(),
|
||||
scene_index: yup.string().optional().nullable(),
|
||||
})
|
||||
.array(
|
||||
yup.object({
|
||||
movie_id: yup.string().required(),
|
||||
scene_index: yup.string().optional().nullable(),
|
||||
})
|
||||
)
|
||||
.optional()
|
||||
.nullable(),
|
||||
tag_ids: yup.array(yup.string().required()).optional().nullable(),
|
||||
cover_image: yup.string().optional().nullable(),
|
||||
stash_ids: yup.mixed<GQL.StashIdInput>().optional().nullable(),
|
||||
stash_ids: yup.mixed<GQL.StashIdInput[]>().optional().nullable(),
|
||||
});
|
||||
|
||||
const initialValues = useMemo(
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export const StudioEditPanel: React.FC<IStudioEditPanel> = ({
|
|||
image: yup.string().optional().nullable(),
|
||||
rating100: yup.number().optional().nullable(),
|
||||
parent_id: yup.string().optional().nullable(),
|
||||
stash_ids: yup.mixed<GQL.StashIdInput>().optional().nullable(),
|
||||
stash_ids: yup.mixed<GQL.StashIdInput[]>().optional().nullable(),
|
||||
aliases: yup
|
||||
.array(yup.string().required())
|
||||
.optional()
|
||||
|
|
|
|||
Loading…
Reference in a new issue