You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2017/10/22 17:55:11 UTC

[kibble] branch master updated: default to 0 when key not found

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ae5ab6  default to 0 when key not found
4ae5ab6 is described below

commit 4ae5ab6cf61a7e7b8f1d1866c295c2956c401b22
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Oct 22 19:55:03 2017 +0200

    default to 0 when key not found
    
    avoid None + int borks.
---
 api/pages/issue/issues.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/api/pages/issue/issues.py b/api/pages/issue/issues.py
index 9d7d3dd..e3daee9 100644
--- a/api/pages/issue/issues.py
+++ b/api/pages/issue/issues.py
@@ -167,7 +167,7 @@ def run(API, environ, indata, session):
             ts = int(bucket['key'] / 1000)
             count = bucket['doc_count']
             timeseries[ts] = timeseries.get(ts, {iType + ' opened': 0, iType + ' closed': count})
-            timeseries[ts][iType + ' opened'] = timeseries[ts].get(iType + ' opened') + count
+            timeseries[ts][iType + ' opened'] = timeseries[ts].get(iType + ' opened', 0) + count
             
         
         ####################################################################

-- 
To stop receiving notification emails like this one, please contact
['"commits@kibble.apache.org" <co...@kibble.apache.org>'].