Merge branch 'cthulahoops-large_imports'
This commit is contained in:
@ -61,7 +61,7 @@ class ImportItem(models.Model):
|
||||
def get_book_from_db_isbn(self):
|
||||
''' see if we already know about the book '''
|
||||
try:
|
||||
return Edition.objects.get(isbn_13=self.isbn)
|
||||
return Edition.objects.filter(isbn_13=self.isbn).first()
|
||||
except Edition.DoesNotExist:
|
||||
return None
|
||||
|
||||
@ -89,7 +89,7 @@ class ImportItem(models.Model):
|
||||
def shelf(self):
|
||||
''' the goodreads shelf field '''
|
||||
if self.data['Exclusive Shelf']:
|
||||
return GOODREADS_SHELVES[self.data['Exclusive Shelf']]
|
||||
return GOODREADS_SHELVES.get(self.data['Exclusive Shelf'])
|
||||
|
||||
@property
|
||||
def review(self):
|
||||
|
Reference in New Issue
Block a user