1
0
Fork 0

Adds more fields to import admin table and ticks version

This commit is contained in:
Mouse Reeve 2022-11-03 11:30:43 -07:00
parent 3f2f718878
commit 40e9428b49
4 changed files with 25 additions and 4 deletions

View file

@ -58,6 +58,16 @@ class ImportJob(models.Model):
"""And how many pending items??"""
return self.pending_items.count()
@property
def successful_item_count(self):
"""How many found a book?"""
return self.items.filter(book__isnull=False).count()
@property
def failed_item_count(self):
"""How many found a book?"""
return self.items.filter(fail_reason__isnull=False).count()
class ImportItem(models.Model):
"""a single line of a csv being imported"""