Skip to content

Commit

Permalink
Merge pull request #3292 from freelawproject/2733-seal-items-not-in-ia
Browse files Browse the repository at this point in the history
fix(admin): Only do IA work if there's IA info
  • Loading branch information
mlissner authored Oct 20, 2023
2 parents 37a6677 + 51441ee commit fa731aa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cl/search/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ def seal_documents(self, request: HttpRequest, queryset: QuerySet) -> None:
rd.filepath_local.delete()

# Internet Archive
url = rd.filepath_ia
r = delete_from_ia(url)
if not r.ok:
ia_failures.append(url)
if rd.filepath_ia:
url = rd.filepath_ia
r = delete_from_ia(url)
if not r.ok:
ia_failures.append(url)

queryset.update(
date_upload=None,
Expand Down

0 comments on commit fa731aa

Please sign in to comment.