From 145cd9fd3414eb5344042643da013443f29859ed Mon Sep 17 00:00:00 2001 From: owocki Date: Thu, 24 Sep 2020 11:51:46 -0600 Subject: [PATCH] sybil score when - was making a positive risk score --- app/grants/tasks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/grants/tasks.py b/app/grants/tasks.py index 8041f985d15..75c4c86972a 100644 --- a/app/grants/tasks.py +++ b/app/grants/tasks.py @@ -73,6 +73,8 @@ def update_grant_metadata(self, grant_id, retry: bool = True) -> None: try: ss = float(instance.sybil_score) instance.weighted_risk_score = float(ss ** 2) * float(math.sqrt(float(instance.clr_prediction_curve[0][1]))) + if ss < 0: + instance.weighted_risk_score = 0 except Exception as e: print(e)