Skip to content

Commit

Permalink
fix: Unsupported projection option for hasMarkup field
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianGille committed May 16, 2024
1 parent 7fdb283 commit 444789d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions packages/server/mailing/mailing.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ MailingSchema.statics.findForApiWithPagination = async function findForApiWithPa
author: 1,
userId: '$_user',
tags: 1,
hasHtmlPreview: {
$cond: { if: { $gt: ['$previewHtml', null] }, then: true, else: false },
},
hasHtmlPreview: { $ne: ['$previewHtml', null] },
_workspace: 1,
espIds: 1,
updatedAt: 1,
Expand Down
4 changes: 1 addition & 3 deletions packages/server/template/template.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ TemplateSchema.statics.findForApi = async function findForApi(query = {}) {
updatedAt: 1,
_company: 1,
assets: 1,
hasMarkup: {
$cond: { if: { $gt: ['$markup', null] }, then: true, else: false },
},
hasMarkup: { $ne: ['$markup', null] },
})
.populate({ path: '_company', select: 'id name' })
.sort({ name: 1 })
Expand Down

0 comments on commit 444789d

Please sign in to comment.