diff --git a/server/model-manuscript/src/graphql.js b/server/model-manuscript/src/graphql.js index 66fccc2025707a0173f890cee03c3c2319832bda..40bda25947ef00bab872582f37616e7f22c9ea42 100644 --- a/server/model-manuscript/src/graphql.js +++ b/server/model-manuscript/src/graphql.js @@ -1,4 +1,3 @@ -const merge = require('lodash/merge') const { ref, raw } = require('objection') const axios = require('axios') const { GoogleSpreadsheet } = require('google-spreadsheet') @@ -54,7 +53,14 @@ const ManuscriptResolvers = ({ isVersion }) => { const commonUpdateManuscript = async (_, { id, input }, ctx) => { const manuscriptDelta = JSON.parse(input) const manuscript = await ctx.models.Manuscript.query().findById(id) - const updatedManuscript = merge({}, manuscript, manuscriptDelta) + + const updatedManuscript = { + ...manuscript, + submission: { + ...manuscript.submission, + ...manuscriptDelta.submission, + }, + } // if (manuscript.status === 'revise') { // return manuscript.createNewVersion(update)