Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1100717 committed Apr 25, 2017
1 parent 6f0464f commit a2ec4b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions rqalpha/model/portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ def __missing__(self, key):
return self._accounts[a_type].positions[key]
return None

def __contains__(self, item):

This comment has been minimized.

Copy link
@wh1100717

wh1100717 Apr 25, 2017

Author Member
return item in self.keys()

def __repr__(self):
keys = []
for account in six.itervalues(self._accounts):
Expand Down
2 changes: 1 addition & 1 deletion rqalpha/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_user_config_path(config_path=None):
if config_path is None:
if os.path.exists(os.path.abspath(os.path.join(os.getcwd(), "config.yml"))):
return os.path.abspath(os.path.join(os.getcwd(), "config.yml"))
if os.path.abspath(os.path.join(os.getcwd(), "config.json")):
if os.path.exists(os.path.abspath(os.path.join(os.getcwd(), "config.json"))):
return os.path.abspath(os.path.join(os.getcwd(), "config.json"))
return None
else:
Expand Down

0 comments on commit a2ec4b8

Please sign in to comment.