commit
2b2df9d3b5
|
@ -273,8 +273,11 @@ def add_by_isbn_from_google(isbn, work=None):
|
||||||
|
|
||||||
logger.info(u"adding new book by isbn %s", isbn)
|
logger.info(u"adding new book by isbn %s", isbn)
|
||||||
results = get_google_isbn_results(isbn)
|
results = get_google_isbn_results(isbn)
|
||||||
if results:
|
if results and 'items' in results:
|
||||||
item = get_isbn_item(results['items'], isbn)
|
item = get_isbn_item(results['items'], isbn)
|
||||||
|
if not item:
|
||||||
|
logger.exception(u"no items for %s", isbn)
|
||||||
|
return None
|
||||||
try:
|
try:
|
||||||
return add_by_googlebooks_id(
|
return add_by_googlebooks_id(
|
||||||
item['id'],
|
item['id'],
|
||||||
|
|
Loading…
Reference in New Issue