Skip to content

Fetching taxon with auth returns wrong establishment means #459

@kueda

Description

@kueda

When I (kueda) GET details for American Bullfrog, I always get the establishment_means for California, regardless of how I change my settings (e.g. change search place to British Columbia, or alter my name priorities). For example, when I do this:

curl -XGET \
  -H "Authorization: MY-JWT" \
  'https://api.inaturalist.org/v2/taxa/65979?fields=(establishment_means:(establishment_means:!t,place:(name:!t)))'

I get

{
    "total_results": 1,
    "page": 1,
    "per_page": 30,
    "results":
    [
        {
            "id": 65979,
            "establishment_means":
            {
                "establishment_means": "introduced",
                "place":
                {
                    "name": "California"
                }
            }
        }
    ]
}

This is also apparent on the website, where I always see "Introduced in California, US" at https://www.inaturalist.org/taxa/65979-Lithobates-catesbeianus.

In theory, I should be able to control what place I see the establishment means for. I suspect this is linked to the place_id attribute on User, which used to control name localization but doesn't ever since we moved to taxon name priorities. It might also have something to do with pagination, since bullfrog has a lot of listed taxa associated with it. I'm not sure what the best kind of control would be, maybe using the search_place_id.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions