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) => { ...@@ -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.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.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){ for(let item of survey.alternatives.items){
if(item.enable) { if(item.enable) {
item.elements.contents = item.elements.contents.find(o => o.language === req.userData.language) item.elements.contents = item.elements.contents.find(o => o.language === req.userData.language)
......
...@@ -27,7 +27,6 @@ const altschema = new Schema({ ...@@ -27,7 +27,6 @@ const altschema = new Schema({
_id:mongoose.ObjectId, _id:mongoose.ObjectId,
short_name: { short_name: {
type: String, type: String,
index: { unique: true, sparse: true }
}, },
description: { description: {
type: String, type: String,
...@@ -107,7 +106,6 @@ const PrePostSurveySchema = new Schema({ ...@@ -107,7 +106,6 @@ const PrePostSurveySchema = new Schema({
short_name: { short_name: {
type: String, type: String,
required: true, required: true,
index: { unique: true, sparse: true }
}, },
description: { description: {
type: String, 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