Skip to content

Commit e3ad16e

Browse files
fix: comments
1 parent 1e84933 commit e3ad16e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

alpaca/broker/client.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,10 @@ def _get_account_activities_iterator(
524524
# ok we made it to the end, we need to ask for the next page of results
525525
last_result = result[-1]
526526

527-
assert (
528-
"id" in last_result
529-
), "AccountActivity didn't contain an `id` field to use for paginating results"
527+
if "id" not in last_result:
528+
raise AssertionError(
529+
"AccountActivity didn't contain an `id` field to use for paginating results"
530+
)
530531

531532
# set the pake token to the id of the last activity so we can get the next page
532533
request_fields["page_token"] = last_result["id"]

alpaca/common/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pydantic import BaseModel, ConfigDict
1+
from pydantic import BaseModel
22
import pprint
33

44

0 commit comments

Comments
 (0)