Skip to content

Commit

Permalink
fix(docs): Quick Start get_last() error
Browse files Browse the repository at this point in the history
  • Loading branch information
zaigie committed Dec 7, 2023
1 parent 3f13972 commit def95f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Collector(BaseCollector):
def get_last(self, name):
algo_results = self.get(name)
if algo_results is not None and len(algo_results.keys()) > 0:
return algo_results[max(algo_results.keys())]
return algo_results[(str(max([int(k) for k in algo_results.keys()])))]
return None


Expand Down
2 changes: 1 addition & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Collector(BaseCollector):
def get_last(self, name):
algo_results = self.get(name)
if algo_results is not None and len(algo_results.keys()) > 0:
return algo_results[max(algo_results.keys())]
return algo_results[(str(max([int(k) for k in algo_results.keys()])))]
return None


Expand Down

0 comments on commit def95f2

Please sign in to comment.