Skip to content

Commit

Permalink
fix: do not update source if it is none
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixq committed Nov 27, 2024
1 parent 474fbef commit d93adca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ def _source_update(self, message):
deleted = message.attributes['deleted'] == 'true'

source_repo = osv.get_source_repository(source)
if source_repo is None:
logging.info('Failed to get source repository %s', source)
return

if source_repo.type == osv.SourceRepositoryType.GIT:
repo = osv.ensure_updated_checkout(
source_repo.repo_url,
Expand Down

0 comments on commit d93adca

Please sign in to comment.