Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347787 )

Change subject: Don't crash on missing ct_id
......................................................................

Don't crash on missing ct_id

Some records we'll ignore have none, let's not send failmail

Change-Id: I1ab2e4d3485cd18839dfaed1f0aed17786005714
---
M audit/paypal/TrrFile.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/87/347787/1

diff --git a/audit/paypal/TrrFile.py b/audit/paypal/TrrFile.py
index 25eab2c..d4a01eb 100644
--- a/audit/paypal/TrrFile.py
+++ b/audit/paypal/TrrFile.py
@@ -145,7 +145,7 @@
             # Here it can be the ct_id.attempt format
             out['contribution_tracking_id'] = row['Invoice ID'].split('.')[0]
 
-        if out['contribution_tracking_id']:
+        if 'contribution_tracking_id' in out:
             out['order_id'] = out['contribution_tracking_id']
 
         event_type = row['Transaction Event Code'][0:3]

-- 
To view, visit https://gerrit.wikimedia.org/r/347787
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ab2e4d3485cd18839dfaed1f0aed17786005714
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to