v3: fix reminders with no startDate

This commit is contained in:
Matteo Pagliazzi
2016-05-13 10:34:09 +02:00
parent 8183b0d084
commit 9514e9c5a8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ const IS_PROD = nconf.get('IS_PROD');
// Use Q promises instead of mpromise in mongoose
mongoose.Promise = Bluebird;
let mongooseOptions = true ? {} : {
let mongooseOptions = !IS_PROD ? {} : {
replset: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
server: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
};
+1 -1
View File
@@ -47,7 +47,7 @@ export let TaskSchema = new Schema({
reminders: [{
_id: false,
id: {type: String, validate: [validator.isUUID, 'Invalid uuid.'], default: shared.uuid, required: true},
startDate: {type: Date, required: true},
startDate: {type: Date},
time: {type: Date, required: true},
}],
}, _.defaults({