mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
only get archive_size if index.html is present within dir
This commit is contained in:
parent
c24e4bf11d
commit
a6c64f2560
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ class SnapshotAdmin(SearchResultsAdminMixin, admin.ModelAdmin):
|
|||
return snapshot_icons(obj)
|
||||
|
||||
def size(self, obj):
|
||||
archive_size = obj.archive_size
|
||||
archive_size = (Path(obj.link_dir) / 'index.html').exists() and obj.archive_size
|
||||
if archive_size:
|
||||
size_txt = printable_filesize(archive_size)
|
||||
if archive_size > 52428800:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue