From 58869940f3794aa7fd4f1717e47824877217def9 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Fri, 27 Sep 2019 14:32:49 +0530 Subject: [PATCH] feat: account for single contribution for grant in clr --- app/grants/clr.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/grants/clr.py b/app/grants/clr.py index e826c364fd6..5c2dfb579b2 100644 --- a/app/grants/clr.py +++ b/app/grants/clr.py @@ -67,6 +67,10 @@ def generate_grant_pair(grant): else: unique_contributions[profile] = amount + if len(unique_contributions) == 1: + profile = next(iter(unique_contributions)) + unique_contributions['_' + profile] = 1 + profile_pairs = list(combinations(unique_contributions.keys(), 2)) contribution_pairs = list(combinations(unique_contributions.values(), 2))