From 83a88e57abdaf06c95273eb6f09a9acf18daab52 Mon Sep 17 00:00:00 2001 From: Alexander Kavanaugh Date: Sun, 11 Sep 2016 20:09:46 +0000 Subject: [PATCH] charge.fraudulent bugfix --- djstripe/stripe_objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djstripe/stripe_objects.py b/djstripe/stripe_objects.py index 3b80ccfe17..f958f55b11 100644 --- a/djstripe/stripe_objects.py +++ b/djstripe/stripe_objects.py @@ -536,7 +536,7 @@ def _manipulate_stripe_object_hook(cls, data): # Assessments reported by you have the key user_report and, if set, # possible values of safe and fraudulent. Assessments from Stripe have # the key stripe_report and, if set, the value fraudulent. - data["fraudulent"] = data["fraud_details"] and list(data["fraud_details"].values())[0] == "fraudulent" + data["fraudulent"] = bool(data["fraud_details"]) and list(data["fraud_details"].values())[0] == "fraudulent" return data