diff --git a/src/resources/datarequest/datarequest.controller.js b/src/resources/datarequest/datarequest.controller.js index a83ff5ec..052927c7 100644 --- a/src/resources/datarequest/datarequest.controller.js +++ b/src/resources/datarequest/datarequest.controller.js @@ -2177,8 +2177,8 @@ export default class DataRequestController extends Controller { options )); // Get the name of the publishers word template - let publisherTemplate = await PublisherModel.findOne({ name: publisher }, { wordTemplate: 1, _id: 0 }).lean(); - let templateName = publisherTemplate.wordTemplate; + let publisherTemplate = await PublisherModel.findOne({ name: publisher }, { _id: 0 }).lean(); + let templateName = publisherTemplate.wordTemplate; // Send emails to custodian team members who have opted in to email notifications if (emailRecipientType === 'dataCustodian') { emailRecipients = [...custodianManagers]; diff --git a/src/resources/publisher/publisher.model.js b/src/resources/publisher/publisher.model.js index 8ba20629..4dbe68c7 100644 --- a/src/resources/publisher/publisher.model.js +++ b/src/resources/publisher/publisher.model.js @@ -47,7 +47,7 @@ const PublisherSchema = new Schema( federation: { active: { type: Boolean }, auth: { type: Object, select: false }, - endpoints: { type: Boolean, select: false }, + endpoints: { type: Object, select: false }, notificationEmail: { type: Array, select: false }, }, },