Skip to content

Commit e624ae8

Browse files
status_changed
1 parent e8c45b5 commit e624ae8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bbot_server/modules/scans/scans_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ async def handle_event(self, event, asset) -> list[Activity]:
283283
except self.BBOTServerNotFoundError:
284284
existing_scan = None
285285
existing_status_code = get_scan_status_code(getattr(existing_scan, "status_code", SCAN_STATUS_QUEUED))
286-
status_changed = False
287286
# if the scan already exists, update it
288287
if existing_scan:
289288
# ignore if the new status is at or behind the existing one
@@ -309,6 +308,7 @@ async def handle_event(self, event, asset) -> list[Activity]:
309308
status_changed = await self.update_scan_status(scan_id=scan_id, status_code=scan.status_code)
310309
else:
311310
self.log.warning(f'Scan "{scan.name}" found in database, but event has no duration_seconds')
311+
status_changed = False
312312
# otherwise, assume the scan is starting and create a new run
313313
else:
314314
description = f"Scan [[COLOR]{scan.name}[/COLOR]] started"

0 commit comments

Comments
 (0)