diff options
Diffstat (limited to 'cgi/modapi.py')
-rw-r--r-- | cgi/modapi.py | 2 |
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" |