Browse Source

only show data featured in the chart in the table

Daniel Sheffield 1 year ago
parent
commit
ade13c778a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/rest/pyapi.py

+ 1 - 1
app/rest/pyapi.py

@@ -78,7 +78,7 @@ def get_form(action, method, filter_data, data):
         'group': 2,
         'unit': 3
     }[x])
-    data = data.groupby([
+    data = data[data['$/unit'].apply(lambda x: (x or False) and True)].groupby([
         k for k in keys if k != 'unit'
     ]).size().reset_index()[[
         k for k in keys if k != 'unit'