Commit 8b2cd759 authored by antoine masson's avatar antoine masson
Browse files

v0.85

- Remove unique on model
- Fix language bug on objective
parent e03aba93
......@@ -466,6 +466,8 @@ exports.getSurveykey = async (req, res) => {
survey.general.conclusiontext.content = survey.general.conclusiontext.content.find(o => o.language === req.userData.language)
survey.alternatives.content = survey.alternatives.content.find(o => o.language === req.userData.language)
survey.objectives.content = survey.objectives.content.find(o => o.language === req.userData.language)
for(let item of survey.alternatives.items){
if(item.enable) {
item.elements.contents = item.elements.contents.find(o => o.language === req.userData.language)
......
......@@ -27,7 +27,6 @@ const altschema = new Schema({
_id:mongoose.ObjectId,
short_name: {
type: String,
index: { unique: true, sparse: true }
},
description: {
type: String,
......@@ -107,7 +106,6 @@ const PrePostSurveySchema = new Schema({
short_name: {
type: String,
required: true,
index: { unique: true, sparse: true }
},
description: {
type: String,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment