Skip to content

Commit 06151b3

Browse files
committed
Fixed logic
1 parent b8b0603 commit 06151b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scanoss/inspection/dependency_track/project_violation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def _safe_timestamp(field, value=None, default=0) -> float:
258258
self.print_msg(f'last_vulnerability_analysis is updated: {last_vulnerability_analysis >= last_import}')
259259
self.print_msg(f'last_occurrence is updated: {last_occurrence >= last_import}')
260260
# Catches case where vulnerability analysis is skipped for empty SBOMs
261-
if last_occurrence >= last_import:
261+
if 0 < last_import <= last_occurrence:
262262
component_count = metrics.get('components', 0) if isinstance(metrics, dict) else 0
263263
if component_count < 1:
264264
self.print_msg('Notice: Empty SBOM detected. Assuming no violations.')

0 commit comments

Comments
 (0)