From c46d1ccb4620afa9c1d8b18b655123ac92d4ddfb Mon Sep 17 00:00:00 2001 From: Lynn Root Date: Mon, 10 Feb 2014 15:26:13 -0500 Subject: [PATCH] fixed issue where there is no 2014 cpi data --- apis/platform_pricing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apis/platform_pricing.py b/apis/platform_pricing.py index 9f28f52d..fa65084f 100644 --- a/apis/platform_pricing.py +++ b/apis/platform_pricing.py @@ -144,8 +144,9 @@ def get_adjusted_price(self, price, year, current_year=None): This essentially is the calculated inflation for an item. """ - if current_year is None: - current_year = datetime.datetime.now().year + if current_year is None or current_year > 2013: + current_year = 2013 + # If our data range doesn't provide a CPI for the given year, use # the edge data. if year < self.first_year: