v3: fix reminders with no startDate
This commit is contained in:
@@ -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 } },
|
||||
};
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user