diff --git a/QUANTAXIS/QAARP/QAUser.py b/QUANTAXIS/QAARP/QAUser.py index 1f2abbdf7..c70daa254 100755 --- a/QUANTAXIS/QAARP/QAUser.py +++ b/QUANTAXIS/QAARP/QAUser.py @@ -394,7 +394,7 @@ def get_portfolio(self, portfolio_cookie: str): ''' # return self.portfolio_list[portfolio] # fix here use cookie as key to find value in dict - return QA.QA_Portfolio(user_cookie=self.user_cookie, portfolio_cookie= portfolio_cookie) + return QA_Portfolio(user_cookie=self.user_cookie, portfolio_cookie= portfolio_cookie) def generate_simpleaccount(self): """make a simple account with a easier way @@ -560,7 +560,7 @@ def reload(self, message): self.password = message.get('password') self.user_cookie = message.get('user_cookie') # - self.portfolio_list = [ + self.portfolio_list = list(set([ item['portfolio_cookie'] for item in DATABASE.portfolio.find( {'user_cookie': self.user_cookie}, { @@ -568,7 +568,7 @@ def reload(self, message): '_id': 0 } ) - ] + ])) # portfolio_list = message.get('portfolio_list') # if len(portfolio_list) > 0: diff --git a/QUANTAXIS/__init__.py b/QUANTAXIS/__init__.py index 1ea25bf78..156c0cc3f 100755 --- a/QUANTAXIS/__init__.py +++ b/QUANTAXIS/__init__.py @@ -31,7 +31,7 @@ 2017/4/8 """ -__version__ = '1.5.4' +__version__ = '1.5.5' __author__ = 'yutiansut' import argparse