Skip to content

Commit 050a745

Browse files
authored
Merge pull request #31 from mondaycom/feature/michaelim/monday-updates-incremental-fix
incremetal updates fetch fix
2 parents a88ecae + e502df1 commit 050a745

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
setup(
1717
name="monday-api-python-sdk", # Required
18-
version="1.5.0", # Required
18+
version="1.5.1", # Required
1919
description="A Python SDK for interacting with Monday's GraphQL API", # Optional
2020
long_description=long_description, # Optional
2121
long_description_content_type="text/markdown", # Optional (see note above)

src/monday_sdk/modules/updates.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def fetch_board_updates(
4343
"""
4444
Fetches all updates from a board (with optional date filtering).
4545
- Paginates through all pages until no more updates.
46-
- If from_date or to_date are provided, filters out updates outside that window.
46+
- Uses API-level date filtering (requires API version 2026-01+) when dates are provided.
47+
- Also applies client-side filtering as additional safety/fallback.
4748
"""
4849
start_dt = datetime.fromisoformat(updated_after) if updated_after else None
4950
end_dt = datetime.fromisoformat(updated_before) if updated_before else None
@@ -52,7 +53,12 @@ def fetch_board_updates(
5253
page = 1
5354

5455
while True:
55-
updates = self.fetch_board_updates_page(board_ids, page=page)
56+
updates = self.fetch_board_updates_page(
57+
board_ids,
58+
page=page,
59+
from_date=updated_after,
60+
to_date=updated_before
61+
)
5662
if not updates:
5763
break
5864

0 commit comments

Comments
 (0)