From 2b93a0bbe4af18ae47a2717e00dd4f47e3fd0eff Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 15 Aug 2018 14:22:01 -0400 Subject: [PATCH] [bugfix] Daemon: Do not un-initialize controller no_result_url * src/server/daemon/Daemon.js (getProgramController): Do not initialize `no_results_url' to an empty string if not provided; instead, keep any existing value. Otherwise, later calls with no arguments will clear previously-set values. DEV-3254 --- src/server/daemon/Daemon.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/server/daemon/Daemon.js b/src/server/daemon/Daemon.js index 7a13769..b9e2895 100644 --- a/src/server/daemon/Daemon.js +++ b/src/server/daemon/Daemon.js @@ -183,12 +183,24 @@ module.exports = AbstractClass( 'Daemon', }, + /** + * Get (and initialize) controller + * + * The controller will only be initialized with the session key SKEY and + * all-submit notification URL NO_RESULTS_URL if they are provided, + * respectively. + * + * @param {string=} skey session key + * @param {no_results_url=} no_results_url URL for all-submit notification + * + * @return {Object} controller + */ 'protected getProgramController': function( skey, no_results_url ) { var controller = require( './controller' ); controller.rater = this._rater; - controller.no_results_url = no_results_url || ""; + controller.no_results_url = no_results_url || controller.no_results_url; if ( skey ) {