1
0

cleanup get_full_history. fix #3939

This commit is contained in:
ThomasV
2018-02-21 11:52:40 +01:00
parent 1703e0036a
commit 9f7e256e39
4 changed files with 33 additions and 40 deletions

View File

@@ -108,8 +108,6 @@ class ExchangeBase(PrintError):
return []
def historical_rate(self, ccy, d_t):
if d_t is None:
return 'NaN'
return self.history.get(ccy, {}).get(d_t.strftime('%Y-%m-%d'), 'NaN')
def get_currencies(self):
@@ -520,8 +518,6 @@ class FxThread(ThreadJob):
return "%s" % (self.ccy_amount_str(value, True))
def history_rate(self, d_t):
if d_t is None:
return Decimal('NaN')
rate = self.exchange.historical_rate(self.ccy, d_t)
# Frequently there is no rate for today, until tomorrow :)
# Use spot quotes in that case