Skip to content

Fix RescueGroups species filter: operation "equal" not "equals" - #180

Draft
kmpat339 wants to merge 1 commit into
masterfrom
worktree-fix-rescuegroups-operation-equal
Draft

kmpat339 wants to merge 1 commit into
masterfrom
worktree-fix-rescuegroups-operation-equal

Conversation

@kmpat339

@kmpat339 kmpat339 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Problem

You were right — the RescueGroups v5 API's documented filter operations are equal, notequal, contains, notcontains, blank, notblank, lessthan, greaterthan, etc. There is no equals.

The species filter in _build_species_filters used "operation": "equals". An unrecognized operation is silently ignored by the API, so the species.singular filter never actually applied. This is very likely the real cause of the zero-results behavior the docstring warns about (#124).

Change

  • adoption_sources/rescue_groups.py: "equals""equal" in the species filter, plus a docstring note.
  • tests/test_rescue_groups.py: updated expected payloads.

Verification

  • pytest — 134 passed, 1 skipped (live test; no API key in this environment).
  • Still needs a live-API check with CUTEPETSBOSTON_RESCUEGROUPS_API_KEY set: pytest tests/test_rescue_groups_live.py

🤖 Generated with Claude Code

The RescueGroups v5 API's documented filter operations are equal,
notequal, contains, blank, etc. -- there is no "equals". An
unrecognized operation is silently ignored, so the species filter
never applied and multi-species searches could return zero results
(the #124 symptom the docstring warns about).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QdBGKrsY7nJdXXYDKNq6o5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant