diff options
author | John Wiegley <johnw@newartisans.com> | 2009-06-28 15:57:49 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-06-28 15:57:49 +0100 |
commit | b90ec255221a90f34d313b7f3433e7d686a7b1c9 (patch) | |
tree | 95b06cfb30a4b2c40d4881dafa6e95ef64b2790c /src/commodity.cc | |
parent | e8f315f00d0874e2afdee45525c4ce96d0768336 (diff) | |
download | fork-ledger-b90ec255221a90f34d313b7f3433e7d686a7b1c9.tar.gz fork-ledger-b90ec255221a90f34d313b7f3433e7d686a7b1c9.tar.bz2 fork-ledger-b90ec255221a90f34d313b7f3433e7d686a7b1c9.zip |
Reject downloaded quotes price in the wrong commodity
Diffstat (limited to 'src/commodity.cc')
-rw-r--r-- | src/commodity.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/commodity.cc b/src/commodity.cc index 900fe07d..37f0b573 100644 --- a/src/commodity.cc +++ b/src/commodity.cc @@ -407,7 +407,10 @@ commodity_t::check_for_updated_price(const optional<price_point_t>& point, "attempting to download a more current quote..."); if (optional<price_point_t> quote = parent().get_commodity_quote(*this, in_terms_of)) { - return quote; + if (! in_terms_of || + (quote->price.has_commodity() && + quote->price.commodity() == *in_terms_of)) + return quote; } } } |