Skip to content

Commit

Permalink
source-hubspot-native: ignore extra associations page results
Browse files Browse the repository at this point in the history
This has been observed in a production task, and for now we will not capture
associations beyond the first page. This could be reconsidered in the future.
  • Loading branch information
williamhbaker committed Sep 23, 2024
1 parent e2edd27 commit 9b521b8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source-hubspot-native/source_hubspot_native/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,16 @@ class To(BaseModel, extra="forbid"):
# TODO(johnny): This can potentially have a `pager`, but I'm leaving it out
# to see if it's ever encountered. If it is, I think we handle by ignoring
# it and having a position of "we'll get (only) the first page".
# TODO(whb): We did encounter this, and for now have decided to ignore any
# extra pages.
class Cursor(BaseModel, extra="forbid"):
after: str
link: str

class Paging(BaseModel, extra="forbid"):
next: "Association.Cursor"

paging: Paging | None = None


# An unconstrained Item type.
Expand Down

0 comments on commit 9b521b8

Please sign in to comment.