Skip to content

Commit

Permalink
- fix : 修正识别默认参数
Browse files Browse the repository at this point in the history
  • Loading branch information
lamter committed Mar 13, 2016
1 parent 0a2e09f commit 310bf64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions easyquotation/jsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def etfindex(self, index_id="", min_volume=0, max_discount=None, min_discount=No
if min_volume:
# 过滤小于指定交易量的数据
data = {fund_id: cell for fund_id, cell in data.items() if float(cell["volume"]) >= min_volume}
if min_discount:
if min_discount is not None:
# 指定最小溢价率
if isinstance(min_discount, str):
if min_discount.endswith("%"):
Expand All @@ -249,7 +249,7 @@ def etfindex(self, index_id="", min_volume=0, max_discount=None, min_discount=No
else:
min_discount = float(min_discount) / 100.
data = {fund_id: cell for fund_id, cell in data.items() if self.percentage2float(cell["discount_rt"]) >= min_discount}
if max_discount:
if max_discount is not None:
# 指定最大溢价率
if isinstance(max_discount, str):
if max_discount.endswith("%"):
Expand Down

0 comments on commit 310bf64

Please sign in to comment.