mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-03-27 01:09:57 +08:00
### What problem does this PR solve? Fixes a bug in the Asana connector where providing `Project IDs` caused sync to fail with: `project_membership: Not a recognized ID: <PROJECT_GID>` Root cause: the connector called `get_project_membership(project_gid)`, but that API expects a **project membership gid**, not a **project gid**. This PR switches to the correct project-scoped API and adds regression tests. Fixes: [#13669](https://github.com/infiniflow/ragflow/issues/13669) ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) ### Changes made - Updated `common/data_source/asana_connector.py`: - Replaced `get_project_membership(pid, ...)` with `get_project_memberships_for_project(pid, ...)` - Trimmed and filtered `asana_project_ids` parsing to avoid empty/whitespace IDs - Normalized `asana_team_id` by trimming whitespace - Used safer access for membership email extraction (`m.get("user")`) - Added `test/unit_test/common/test_asana_connector.py`: - Verifies the correct project-membership API method is called - Verifies empty `project_ids` path returns workspace emails - Verifies project/team input normalization behavior ### Compatibility / risk - Non-breaking bug fix - No API contract changes - Existing behavior for empty `Project IDs` remains unchanged