Skip to content

Commit a243213

Browse files
committed
Added a conditional check to avoid a fatal error when the input JSON is missing a categories prop
1 parent 2db17a0 commit a243213

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/add_new_contribution_to_yaml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
props = json.loads(argv[1])
1717
# process category list
18-
if props['categories']:
18+
if 'categories' in props and props['categories']:
1919
props['categories'] = sorted(props['categories'].replace('"', '').split(','))
2020
props['categories'] = [category.strip() for category in props['categories']]
2121
else:

0 commit comments

Comments
 (0)