fix nullable content
This commit is contained in:
parent
45a960bce3
commit
7c54d52d98
|
|
@ -96,7 +96,7 @@ export const getInitialValuesBase = (objectToEdit: Question): any => {
|
|||
return {
|
||||
id: objectToEdit?.id ?? null,
|
||||
content: objectToEdit?.content ?? null,
|
||||
content_image: objectToEdit?.content_image ?? "",
|
||||
content_image: objectToEdit?.content_image ?? null,
|
||||
subject_id: objectToEdit?.subject_id ?? "",
|
||||
isBase: 1,
|
||||
parent_id: objectToEdit?.parent_id ?? "",
|
||||
|
|
@ -112,7 +112,7 @@ export const getValidationSchemaBase = () => {
|
|||
// validate input
|
||||
return Yup.object().shape({
|
||||
content_image: Yup.string().nullable(),
|
||||
content: Yup.string(),
|
||||
content: Yup.string().nullable(),
|
||||
Questions: Yup.array().of(
|
||||
Yup.object().shape({
|
||||
content_image: Yup.string().nullable(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user