From d3eed2282c393427a455c622e24930e30fd87497 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Wed, 27 Nov 2013 16:08:34 +0100 Subject: [PATCH] fix custom day start, @lefnire we may have to restore old values or make a bailey announcement about this, also client-side the validation prevents deleting the old value, it only allows to use the increase/decrease button or selecting the old value and replacing it --- src/models/user.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/models/user.js b/src/models/user.js index 43e91a746f..94e34c2633 100644 --- a/src/models/user.js +++ b/src/models/user.js @@ -258,8 +258,7 @@ UserSchema.virtual('tasks').get(function () { UserSchema.pre('save', function(next) { //this.markModified('tasks'); - - if (_.isNaN(this.preferences.dayStart) || this.preferences.dayStart < 0 || this.preferences.dayStart > 0) { + if (_.isNaN(this.preferences.dayStart) || this.preferences.dayStart < 0 || this.preferences.dayStart > 24) { this.preferences.dayStart = 0; }