From 997eeff66364f04684d89ff80e16e450e16c511d Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Thu, 25 Apr 2019 18:13:44 +0200 Subject: [PATCH] Fix notForColor when no color is set --- hugvey/story.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugvey/story.py b/hugvey/story.py index 1d44f5c..4c1d802 100644 --- a/hugvey/story.py +++ b/hugvey/story.py @@ -546,7 +546,7 @@ class Diversion(object): return - if 'notForColor' in self.params and self.params['notForColor']: + if 'notForColor' in self.params and self.params['notForColor'] and story.currentMessage.color: if story.currentMessage.color.lower() == self.params['notForColor'].lower(): story.logger.debug(f"Skip diversion {self.id} because of section color") return