Skip to content

Commit

Permalink
Merge d2d317e into 3e228ef
Browse files Browse the repository at this point in the history
  • Loading branch information
ehenneken committed Mar 17, 2021
2 parents 3e228ef + d2d317e commit cd0973c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion graphics_service/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ def get_graphics(bibcode):
# Query graphics database with bibcode supplied
results = get_graphics_record(bibcode)
if results and 'thumbnails' in results:
if len(results['thumbnails']) == 0:
try:
thumbnail_count = len(results['thumbnails'])
except:
thumbnail_count = 0
if thumbnail_count == 0:
# No thumbnails = nothing to display
return {'Error': 'Unable to get results!', 'Error Info': 'No thumbnail data for %s' % bibcode}
output = {}
Expand Down

0 comments on commit cd0973c

Please sign in to comment.