From 66417e0010546b8c2ab32d4fa3a684262185dec3 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 1 Mar 2017 19:24:05 +0100 Subject: tracking: Fixed easypost tracker list returning a dict. easypost.Tracker.all() somehow returns a dict. For now, just fetch the 'trackers' key from the result. --- modules/tracking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tracking.py b/modules/tracking.py index 917c960..e7f9c9d 100755 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -328,7 +328,7 @@ class EasypostModule: code = self.splitcode(code) try: - tracker = (t for t in easypost.Tracker.all() if t.tracking_code == code).next() + tracker = (t for t in easypost.Tracker.all()['trackers'] if t.tracking_code == code).next() except StopIteration: tracker = easypost.Tracker.create(tracking_code = code, carrier = self.easypost_carrier) -- cgit v1.2.3