Skip to content

Commit

Permalink
Fix TypeError for external resources link checking task (#2313)
Browse files Browse the repository at this point in the history
  • Loading branch information
pt2302 authored Sep 23, 2024
1 parent 72bfd26 commit 3250b8d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions external_resources/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def check_external_resources(resources: list[int]):
backup_url_status is None or is_backup_url_broken
)
if is_broken:
# both external_url and backup_url are broken.
# both external_url and backup_url are broken
state.status = ExternalResourceState.Status.BROKEN
else:
# Either external_url or backup_url is valid.
# either external_url or backup_url is valid
state.status = ExternalResourceState.Status.VALID

if resource.metadata.get(METADATA_IS_BROKEN) != is_broken:
Expand Down Expand Up @@ -105,4 +105,6 @@ def check_external_resources_for_breakages(self):
)
]
if tasks:
raise self.replace(celery.group(tasks))
return self.replace(celery.group(tasks))

return None

0 comments on commit 3250b8d

Please sign in to comment.