From 339ebe754f7243a70c7a00fe0dad9f42a6f0a435 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 14 Feb 2018 17:27:39 +0100 Subject: [PATCH] ignore storylines without nodename --- recommendation_engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recommendation_engine.py b/recommendation_engine.py index 341901c..c3e04b9 100644 --- a/recommendation_engine.py +++ b/recommendation_engine.py @@ -142,7 +142,7 @@ class Engine: {'key': 'type', 'operator': '==', 'value': 'storylines'}, ], 'operator': '&' - }, ['id', 'name', 'tags', 'nodename']) if entity.get('tags', [])] + }, ['id', 'name', 'tags', 'nodename']) if entity.get('tags', []) and entity.get('nodename')] # Get list of storyline names names = list(set([storyline['name'] for storyline in storylines])) # Get all clips annotated with storyline references