Merge branch 'main' into cancel-imports

This commit is contained in:
Mouse Reeve 2022-11-07 09:06:13 -08:00
commit 493fd68af4

View file

@ -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