Allow and ignore null schema in field update

Fixes #4254
This commit is contained in:
rijkvanzanten
2021-02-23 17:06:35 -05:00
parent 0eb7f01a3e
commit 3d33b9db55
2 changed files with 7 additions and 3 deletions

View File

@@ -74,7 +74,9 @@ const newFieldSchema = Joi.object({
default_value: Joi.any(),
max_length: [Joi.number(), Joi.string(), Joi.valid(null)],
is_nullable: Joi.bool(),
}).unknown(),
})
.unknown()
.allow(null),
meta: Joi.any(),
});
@@ -158,7 +160,9 @@ const updateSchema = Joi.object({
default_value: Joi.any(),
max_length: [Joi.number(), Joi.string(), Joi.valid(null)],
is_nullable: Joi.bool(),
}).unknown(),
})
.unknown()
.allow(null),
meta: Joi.any(),
}).unknown();