From e819e599db6763289569aa1f6777001293121670 Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Mon, 26 Aug 2019 08:04:24 +0200 Subject: [PATCH] Fix crash when hasPlayed condition refers to non-existing message --- hugvey/story.py | 1 + www/js/hugvey_console.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hugvey/story.py b/hugvey/story.py index 16c4850..c605c3a 100644 --- a/hugvey/story.py +++ b/hugvey/story.py @@ -467,6 +467,7 @@ class Condition(object): msg = story.get(self.vars['msgId']) if not msg: story.logger.critical(f"Condition on non-existing message: {self.vars['msgId']}") + return False #: :type msg: Message r = msg.isFinished() diff --git a/www/js/hugvey_console.js b/www/js/hugvey_console.js index 91ff382..2f654b3 100644 --- a/www/js/hugvey_console.js +++ b/www/js/hugvey_console.js @@ -1041,8 +1041,8 @@ class Graph { crel('input', { 'type': 'number', 'min': 1, -// 'max': 5, - 'step': .1, + 'max': 92, + 'step': 1, 'on': { 'change': function(e){ panopticon.graph.configuration['light0_fade'] = e.target.value