From 71e0a501fa036ded203809d75662405b65b65884 Mon Sep 17 00:00:00 2001
From: Andreas <andreasv@fsmpi.rwth-aachen.de>
Date: Mon, 21 Aug 2017 21:54:34 +0200
Subject: [PATCH] fixed stats i broke

---
 stats.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/stats.py b/stats.py
index 098f683..6023782 100644
--- a/stats.py
+++ b/stats.py
@@ -48,11 +48,11 @@ def stats_generic(req, param=None):
 	lastx = 0
 	for row in rows:
 		for key, val in row.items():
-			if req == 'live_views' and key == 'x' and lastx != int(val)-1:
-				for i in range(lastx, int(val)-1):
-					res['x'].append(i)
-					res['y'].append(0)
-			if key == 'x':
+			if req == 'live_views' and key == 'x':
+				if lastx != int(val)-1:
+					for i in range(lastx, int(val)-1):
+						res['x'].append(i)
+						res['y'].append(0)
 				lastx = int(val)
 			if key not in res:
 				res[key] = []
-- 
GitLab