Fixing A posible Bug in the API getting User Stats

This commit is contained in:
Sagi Dayan 2015-08-01 13:45:05 +03:00
parent 222fb2cab0
commit 7118bab598

View file

@ -43,11 +43,14 @@ def get_stats(user):
stats = info["stats"]['micro']
p_data = stats['data']
p_series = stats['series']
try:
user_index = p_series.index(user.username)
#adding commits
data[0] = data[0] + p_data[user_index][0]
#adding open issues
data[1] = data[1] + p_data[user_index][1]
except Exception:
pass
messages = Message.all().filter('master_id =', user.key().id())
for m in messages.run():
data[2] = data[2] + 1