From 6b717e4f331c858410312f89bf14a377ae1410b7 Mon Sep 17 00:00:00 2001 From: Andrew Sutherland Date: Sun, 17 Mar 2019 09:29:48 -0400 Subject: [PATCH] handle null toast_bytes --- lmfdb/api/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lmfdb/api/api.py b/lmfdb/api/api.py index 8175b1bc90..3b258184f1 100644 --- a/lmfdb/api/api.py +++ b/lmfdb/api/api.py @@ -102,6 +102,8 @@ def split_db(tablename): link = tablename else: link = '' + tablename + '' + 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: