Skip to content

Commit 6a82e77

Browse files
Challenge 30115492 ff - update create attachment validation to allow null contentType
1 parent bd0b485 commit 6a82e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/ProcessorServiceAttachment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function createSchema () {
4141
return updateSchema().keys({
4242
category: Joi.string().optional().allow(null).allow(''),
4343
size: Joi.number().optional().allow(null),
44-
contentType: Joi.string().when('type', { is: constants.ATTACHMENT_TYPES.FILE, then: Joi.string().required() }),
44+
contentType: Joi.string().optional().allow(null).when('type', { is: constants.ATTACHMENT_TYPES.FILE, then: Joi.string().required() }),
4545
path: Joi.string().required(),
4646
type: Joi.string().valid(_.values(constants.ATTACHMENT_TYPES)),
4747
tags: Joi.array().items(Joi.string()).optional().allow(null)

0 commit comments

Comments
 (0)