Skip to content

Commit

Permalink
[premieroctet#78] Fix typo in ExpertiseSetSchema definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Aug 30, 2024
1 parent ee8f19e commit 5d24b65
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const mongoose = require('mongoose')
const {schemaOptions} = require('../../../utils/schemas')
const { idEqual } = require('../../../utils/database')
const { idEqual, DUMMY_REF } = require('../../../utils/database')

const Schema = mongoose.Schema

Expand All @@ -25,7 +25,7 @@ const ExpertiseSet = new Schema({

/* eslint-disable prefer-arrow-callback */

ExpertiseSet.virtual('dispay_expertises', DUMMY_REF).get(function() {
ExpertiseSet.virtual('display_expertises', DUMMY_REF).get(function() {
return this.categories.map(function (cat) {cat.find(function (ce) {this.expertises.some(e => idEqual(ce,e))})})
})

Expand Down

0 comments on commit 5d24b65

Please sign in to comment.