Skip to content

Commit 93a126e

Browse files
committed
Initial change -- ignores statuses that aren't present.
Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
1 parent 2e36b60 commit 93a126e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/static_site_generator.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ def generate_site(self, data:list=None, projects:list[str]=None, output_file='./
3030
self.GENERATOR_DATA["project"] = ' '.join(projects) if projects is not None else ""
3131

3232
# Extract unique statuses from the tasks list
33-
unique_statuses = sorted({task["status"] for task in self.GENERATOR_DATA["tasks"]})
34-
33+
statuses:list[str] = []
34+
for task in self.GENERATOR_DATA["tasks"]:
35+
if "status" in task:
36+
statuses.append(task["status"])
37+
unique_statuses:list[str] = sorted(set(statuses))
38+
3539
# Add statuses to the data dictionary
3640
data_with_statuses = {**self.GENERATOR_DATA, "statuses": unique_statuses}
3741

0 commit comments

Comments
 (0)