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

This commit is contained in:
Matteo Pagliazzi
2013-11-27 16:08:34 +01:00
parent a196cc0586
commit d3eed2282c

View File

@@ -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;
}