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: 2 additions & 1 deletion src/sentry/seer/endpoints/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def map_org_id_param(func: Callable) -> Callable:
"""

def wrapper(*, organization_id: int, **kwargs: Any) -> Any:
return func(org_id=organization_id, **kwargs)
kwargs["org_id"] = organization_id
return func(**kwargs)

return wrapper

Expand Down
9 changes: 9 additions & 0 deletions tests/sentry/seer/endpoints/test_organization_seer_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,12 @@ def test_org_read_permission(self) -> None:

assert response.status_code == 200
assert response.data == {"slug": self.organization.slug}

@with_feature("organizations:seer-public-rpc")
def test_org_level_method_duplicate_org_id(self) -> None:
"""Test that organization-level methods work and return correct data"""
path = self._get_path("get_organization_slug")
response = self.client.post(path, data={"args": {"org_id": 1}}, format="json")

assert response.status_code == 200
assert response.data == {"slug": self.organization.slug}
Loading