Skip to content

Commit

Permalink
fix: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiocastrica committed Oct 10, 2023
1 parent 1e84933 commit e3ad16e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions alpaca/broker/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,10 @@ def _get_account_activities_iterator(
# ok we made it to the end, we need to ask for the next page of results
last_result = result[-1]

assert (
"id" in last_result
), "AccountActivity didn't contain an `id` field to use for paginating results"
if "id" not in last_result:
raise AssertionError(
"AccountActivity didn't contain an `id` field to use for paginating results"
)

# set the pake token to the id of the last activity so we can get the next page
request_fields["page_token"] = last_result["id"]
Expand Down
2 changes: 1 addition & 1 deletion alpaca/common/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import BaseModel, ConfigDict
from pydantic import BaseModel
import pprint


Expand Down

0 comments on commit e3ad16e

Please sign in to comment.