From 9f95cb1748a30907938466f338ef1631fc3007e7 Mon Sep 17 00:00:00 2001 From: Logan Davidson Date: Fri, 13 Oct 2023 15:41:35 +0100 Subject: [PATCH] Remove two magic numbers --- backend/rorapp/functions/draw_mortality_chits.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/rorapp/functions/draw_mortality_chits.py b/backend/rorapp/functions/draw_mortality_chits.py index 423acd06..7736f637 100644 --- a/backend/rorapp/functions/draw_mortality_chits.py +++ b/backend/rorapp/functions/draw_mortality_chits.py @@ -10,7 +10,9 @@ def draw_mortality_chits(chits_to_draw=1): ''' # Build a bag of chits - codes = list(range(1, 31)) + lowest_code = 1 + highest_code = 30 + codes = list(range(lowest_code, highest_code + 1)) chits = list(map(lambda code: str(code), codes)) other_chits = ["none", "none", "none", "none", "draw 2", "draw 2"] chits = chits + other_chits