Skip to content

Commit 8d7030d

Browse files
MAS-264 Upgrade mongo db
1 parent 3181441 commit 8d7030d

5 files changed

Lines changed: 3018 additions & 2862 deletions

File tree

cms/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR /app
1010
COPY package.json /app
1111
COPY package-lock.json /app
1212

13-
RUN npm ci --quiet --only=production
13+
RUN npm ci --quiet --omit=dev --legacy-peer-deps
1414

1515
COPY . /app
1616

cms/models/Item.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,12 @@ Item.schema.post("save", async function(doc, next) {
185185
item = await keystone
186186
.list("Item")
187187
.model.findById(doc._id)
188-
.populate("source")
188+
.select(
189+
"_id title slug url shortSummary comment resourceLinks commentUrl publicationDate updatedAt createdAt"
190+
)
191+
.populate({ path: "source", select: "_id title" })
189192
.populate("evidenceType")
190-
.populate("specialities")
191-
.select(Item.fullResponseFields.join(" "))
193+
.populate({ path: "specialities", select: "_id title key broaderTitle" })
192194
.exec();
193195
} catch (err) {
194196
logger.error("An error occurred finding item: ", err.message);

0 commit comments

Comments
 (0)