From ebc30a3bc57cfcb62b12043f20a6b238f1672a79 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Mon, 22 Jun 2015 14:48:44 +0200 Subject: [PATCH] Corrected bug on 404 --- controllers/prototype/dbrequests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/prototype/dbrequests.js b/controllers/prototype/dbrequests.js index b1435ad..4caf494 100644 --- a/controllers/prototype/dbrequests.js +++ b/controllers/prototype/dbrequests.js @@ -361,7 +361,7 @@ ExpIdChecker.prototype.execute = function() { "SELECT scene_id FROM experiment WHERE id = $1;", [self.id], function(err, result) { - if (result === undefined) { + if (result === undefined || result.rows.length === 0) { self.finalResult = null; } else { self.finalResult = result.rows[0].scene_id;