Skip to content

Commit f4ec8d5

Browse files
committed
added a null check
1 parent 5e2425d commit f4ec8d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

functions-python/tasks_executor/src/tasks/licenses/populate_licenses.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def populate_licenses_task(dry_run, db_session):
7474
for license_data in licenses_data:
7575
spdx_data = license_data.get("spdx")
7676
if not spdx_data:
77-
is_spdx = False
77+
logging.warning("Skipping license record without 'spdx' data")
78+
continue
7879
else:
7980
is_spdx = True
8081
license_id = spdx_data.get("licenseId")

0 commit comments

Comments
 (0)