mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
inline archive_size and archive_path snapshot methods
This commit is contained in:
parent
46a7b972ee
commit
48eddadc9b
1 changed files with 5 additions and 2 deletions
|
@ -144,11 +144,14 @@ class Snapshot(models.Model):
|
|||
|
||||
@cached_property
|
||||
def archive_path(self):
|
||||
return self.as_link().archive_path
|
||||
return '{}/{}'.format(ARCHIVE_DIR_NAME, self.timestamp)
|
||||
|
||||
@cached_property
|
||||
def archive_size(self):
|
||||
return self.as_link().archive_size
|
||||
try:
|
||||
return get_dir_size(self.link_dir)[0]
|
||||
except Exception:
|
||||
return 0
|
||||
|
||||
@cached_property
|
||||
def history(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue