mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 10:01:04 +00:00
Merge branch 'main' into cancel-imports
This commit is contained in:
commit
493fd68af4
1 changed files with 2 additions and 0 deletions
|
@ -112,6 +112,8 @@ class ImportJob(models.Model):
|
|||
def percent_complete(self):
|
||||
"""How far along?"""
|
||||
item_count = self.item_count
|
||||
if not item_count:
|
||||
return 0
|
||||
return math.floor((item_count - self.pending_item_count) / item_count * 100)
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in a new issue