From edf6f9a9f2e3b4ac0f10c271731eb8a5f3429c88 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 13 May 2020 14:48:55 +0200 Subject: category count --- cli/commands/bridge/finnegan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/commands/bridge/finnegan.py b/cli/commands/bridge/finnegan.py index 4a6242b..c914d88 100644 --- a/cli/commands/bridge/finnegan.py +++ b/cli/commands/bridge/finnegan.py @@ -67,7 +67,8 @@ class Finneganizer: if not categories or len(categories) == 0: return [word_a] random.shuffle(categories) - categories = categories[:self.category_count] + if self.category_count > 0: + categories = categories[:self.category_count] results = [ word_a ] for category in categories: catid = category['catid'] -- cgit v1.2.3-70-g09d2