diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-09-26 11:51:14 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-09-26 11:51:14 +0200 |
commit | 512972fa1df14df4e208a1182096b1c51b5d38d1 (patch) | |
tree | b5f513759e4ea98c06d2a61810533ce4bb609edf /portfolio.py | |
parent | 6746607a578eca3383ade7fe7a88c39612f4d6e8 (diff) | |
download | Trader-512972fa1df14df4e208a1182096b1c51b5d38d1.tar.gz Trader-512972fa1df14df4e208a1182096b1c51b5d38d1.tar.zst Trader-512972fa1df14df4e208a1182096b1c51b5d38d1.zip |
Don’t raise when some market is disabled
Diffstat (limited to 'portfolio.py')
-rw-r--r-- | portfolio.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/portfolio.py b/portfolio.py index 94472a3..1d29106 100644 --- a/portfolio.py +++ b/portfolio.py | |||
@@ -52,7 +52,7 @@ class Amount: | |||
52 | ticker=asset_ticker, | 52 | ticker=asset_ticker, |
53 | rate=rate) | 53 | rate=rate) |
54 | else: | 54 | else: |
55 | raise Exception("This asset is not available in the chosen market") | 55 | return Amount(other_currency, 0, linked_to=self, ticker=None, rate=0) |
56 | 56 | ||
57 | def as_json(self): | 57 | def as_json(self): |
58 | return { | 58 | return { |