From 062223ebf77f9f3d9a0d96a091bf0e5315490d81 Mon Sep 17 00:00:00 2001 From: Andrei Cioromila <andrei.cioromila@thinslices.com> Date: Fri, 26 Oct 2018 17:50:46 +0300 Subject: [PATCH] feat(collection): remove redundand check for fragment existance --- .../src/routes/collections/delete.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/component-manuscript-manager/src/routes/collections/delete.js b/packages/component-manuscript-manager/src/routes/collections/delete.js index d207fd469..facc2e768 100644 --- a/packages/component-manuscript-manager/src/routes/collections/delete.js +++ b/packages/component-manuscript-manager/src/routes/collections/delete.js @@ -20,11 +20,6 @@ module.exports = models => async (req, res) => { collection = await models.Collection.find(collectionId) const fragmentId = collection.fragments[0] - if (!collection.fragments.includes(fragmentId)) - return res.status(400).json({ - error: `Collection and fragment do not match.`, - }) - fragment = await models.Fragment.find(fragmentId) const authsome = authsomeHelper.getAuthsome(models) -- GitLab