aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorLibravatar Renard 2020-07-27 11:53:39 -0400
committerLibravatar Renard 2020-07-27 11:53:39 -0400
commit47638cc804c084821b2db69e3a2f044da3043d33 (patch)
tree313f7cea3ae9d43c9a3cc2c2b1716cb505884aa6 /cgi
parentb38a9ced073910dab2bb2cf50b67d502fc0663f1 (diff)
downloadweabot-47638cc804c084821b2db69e3a2f044da3043d33.tar.gz
weabot-47638cc804c084821b2db69e3a2f044da3043d33.tar.xz
weabot-47638cc804c084821b2db69e3a2f044da3043d33.zip
Api fix
Diffstat (limited to 'cgi')
-rw-r--r--cgi/modapi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgi/modapi.py b/cgi/modapi.py
index c1f6319..c2301ab 100644
--- a/cgi/modapi.py
+++ b/cgi/modapi.py
@@ -94,7 +94,6 @@ def api_process(self, path_split):
values['members'] = members
elif method == 'stats':
report_count = FetchOne("SELECT COUNT(id) FROM `reports`")
- values['reportCount'] = report_count
try:
with open('stats.json', 'r') as f:
out = json.load(f)
@@ -102,6 +101,7 @@ def api_process(self, path_split):
except ValueError:
values['stats'] = None
raise APIError, "Stats error"
+ values['stats']['reportCount'] = report_count['COUNT(id)']
else:
raise APIError, "Invalid method"