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