Allow import retry

This commit is contained in:
Mouse Reeve
2020-11-13 09:02:41 -08:00
parent 083b576bc4
commit e3a803b907
6 changed files with 103 additions and 15 deletions

View File

@ -48,6 +48,7 @@ class ImportJob(models.Model):
default='public',
choices=PrivacyLevels.choices
)
retry = models.BooleanField(default=False)
class ImportItem(models.Model):
@ -100,6 +101,16 @@ class ImportItem(models.Model):
return None
@property
def title(self):
''' get the book title '''
return self.data['Title']
@property
def author(self):
''' get the book title '''
return self.data['Author']
@property
def isbn(self):
''' pulls out the isbn13 field from the csv line data '''