1
0
Fork 0

Merge pull request #2327 from bookwyrm-social/imports-admin

Imports admin
This commit is contained in:
Mouse Reeve 2022-11-01 20:53:58 -07:00 committed by GitHub
commit 91b935bc0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 185 additions and 2 deletions

View file

@ -48,6 +48,16 @@ class ImportJob(models.Model):
"""items that haven't been processed yet"""
return self.items.filter(fail_reason__isnull=True, book__isnull=True)
@property
def item_count(self):
"""How many books do you want to import???"""
return self.items.count()
@property
def pending_item_count(self):
"""And how many pending items??"""
return self.pending_items.count()
class ImportItem(models.Model):
"""a single line of a csv being imported"""