Skip to content

Commit

Permalink
handle null toast_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewVSutherland committed Mar 17, 2019
1 parent f285793 commit 6b717e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lmfdb/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ def split_db(tablename):
link = tablename
else:
link = '<a href = "' + url_for(".api_query", table=tablename) + '">' + tablename + '</a>'
if not sizes['toast_bytes']:
sizes['toast_bytes'] = 0
if sizes['nrows']:
avg_size = int(round(float(sizes['table_bytes'] + sizes['toast_bytes'] + sizes['extra_bytes']) / sizes['nrows']))
else:
Expand Down

0 comments on commit 6b717e4

Please sign in to comment.