Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### v1.14.5
- Update `property_v2.search` to fix pagination logic bug.

### v1.14.4
- Internal code improvements.

Expand Down
2 changes: 1 addition & 1 deletion parcllabs/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "1.14.4"
VERSION = "1.14.5"
2 changes: 1 addition & 1 deletion parcllabs/services/properties/property_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _fetch_post(self, params: dict[str, Any], data: dict[str, Any]) -> list[dict

if pagination:
limit = pagination.get("limit")
if returned_count == limit:
if returned_count < limit: # if we got fewer results than requested, don't paginate
return all_data

# If we need to paginate, use concurrent requests
Expand Down
4 changes: 2 additions & 2 deletions tests/test_property_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ def test_fetch_post_pagination(mock_post: Mock, property_v2_service: PropertyV2S

result = property_v2_service._fetch_post(params={"limit": 1}, data={})

assert len(result) == 1
assert len(result) == 2
assert result[0]["data"][0]["parcl_id"] == 123
assert mock_post.call_count == 1
assert mock_post.call_count == 2


def test_as_pd_dataframe(property_v2_service: PropertyV2Service, mock_response: Mock) -> None:
Expand Down