From dff77b999391a1d352ec7d9663738b8957a9a406 Mon Sep 17 00:00:00 2001 From: dalepotter Date: Thu, 30 Apr 2015 10:38:42 +0100 Subject: [PATCH] [#234] Fixed error where transaction type was breaking the csv output --- iati_datastore/iatilib/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iati_datastore/iatilib/model.py b/iati_datastore/iatilib/model.py index f030d22..b69834f 100644 --- a/iati_datastore/iatilib/model.py +++ b/iati_datastore/iatilib/model.py @@ -76,7 +76,7 @@ def __init__(self, type_codes): self.type_codes = [x.value for x in type_codes] def __get__(self, obj, type=None): - return [t for t in obj.transactions if t.type.value in self.type_codes] + return [t for t in obj.transactions if t.type and t.type.value in self.type_codes] class Participation(db.Model):