From d8b1b3d7771de517d62d9031715b75dc49125fd2 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Fri, 10 May 2019 13:40:58 +0200 Subject: [PATCH] Don't include vetoed contributions in graph Currently, kredits from vetoed contributions are counted in the graph data. --- app/components/chart-contributions-by-type/component.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/chart-contributions-by-type/component.js b/app/components/chart-contributions-by-type/component.js index aae0374..761b5bd 100644 --- a/app/components/chart-contributions-by-type/component.js +++ b/app/components/chart-contributions-by-type/component.js @@ -20,9 +20,11 @@ export default Component.extend({ chartData: computed('contributions', function() { let kredits = this.contributions + .filterBy('vetoed', false) .map(c => { return { kind: c.kind, amount: c.amount } - }).reduce(function (kinds, c) { + }) + .reduce(function (kinds, c) { if (c.kind in kinds) { kinds[c.kind] = kinds[c.kind] + c.amount } else {