Skip to content

Commit 2f81fb3

Browse files
committed
Add some good checking to prevent data=None
Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
1 parent e043ade commit 2f81fb3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/static_site_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def generate_site(data=None, output_file='./_site/index.html'):
1212
env = Environment(loader=FileSystemLoader('templates'))
1313
template = env.get_template('kaban_board.html')
1414

15-
GENERATOR_DATA["tasks"] = data
15+
GENERATOR_DATA["tasks"] = data if data is not None else []
1616

1717
# Extract unique statuses from the tasks list
1818
unique_statuses = sorted({task["status"] for task in GENERATOR_DATA["tasks"]})

0 commit comments

Comments
 (0)