From be92dff980995b2a9feefeb035328a867d2ae29a Mon Sep 17 00:00:00 2001 From: Steve R Date: Fri, 26 Jun 2015 20:58:39 -0400 Subject: [PATCH] Allow isPaused to be set via Update API This allows the isPaused attribute to be set when calling POST /checks/:id Fixes #316 --- models/check.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/check.js b/models/check.js index f44444a2f..325dab8fd 100644 --- a/models/check.js +++ b/models/check.js @@ -317,7 +317,7 @@ Check.methods.getSingleStatForPeriod = function(period, date, callback) { Check.methods.populateFromDirtyCheck = function(dirtyCheck, pollerCollection) { this.url = dirtyCheck.url || this.url; this.maxTime = dirtyCheck.maxTime || this.maxTime; - this.isPaused = dirtyCheck.isPaused || this.isPaused; + this.isPaused = (dirtyCheck.isPaused == undefined) ? this.isPaused : dirtyCheck.isPaused this.alertTreshold = dirtyCheck.alertTreshold || this.alertTreshold; this.interval = dirtyCheck.interval * 1000 || this.interval;