From 9cc8609244ca940c9732efd0c2d3edd31497a218 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 3 Aug 2018 00:43:13 +0200 Subject: [PATCH] add default gridChange if missing --- recommendation_engine.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recommendation_engine.py b/recommendation_engine.py index ab0f3cc..0fdf31e 100644 --- a/recommendation_engine.py +++ b/recommendation_engine.py @@ -47,12 +47,12 @@ class Engine: 'screenings': {'locked': True, 'value': 2} }, 'globalKeywords': {}, - 'gridChange': { - 'nextClip': {'locked': False, 'value': 4}, - 'nextPlaylist': {'locked': False, 'value': 4}, - 'staySame': {'locked': False, 'value': 8} - - } + } + if 'gridChange' not in self.state: + self.state['gridChange'] = { + 'nextClip': {'locked': False, 'value': 4}, + 'nextPlaylist': {'locked': False, 'value': 4}, + 'staySame': {'locked': False, 'value': 8} } self.update_keywords()