Skip to content

Bug: The 'culture' filter on /object endpoint fails when using culture names #30

Description

@Aofled

Description

The culture parameter on the /object endpoint no longer filters items correctly when using a CULTURE NAME (e.g., "Greek"). It returns zero records. However, filtering by CULTURE ID (e.g., 37527534) still works as expected.

According to the documentation, both names and IDs should be supported. This behavior used to work previously.

Steps to Reproduce

  1. Requesting by Culture Name (Broken):
    https://api.harvardartmuseums.org/object?culture=Greek&apikey={YOUR_API_KEY}

Response:

{
  "info": {
    "totalrecordsperquery": 10,
    "totalrecords": 0,
    "pages": 0,
    "page": 0,
    "responsetime": "15 ms"
  },
  "records": []
}
  1. Requesting by Culture ID (Working):
    https://api.harvardartmuseums.org/object?culture=37527534&apikey={YOUR_API_KEY}

Response:

{
  "info": {
    "totalrecordsperquery": 10,
    "totalrecords": 810,
    "pages": 81,
    "page": 1,
    "responsetime": "24 ms"
  },
  "records": [...]
}

Culture Metadata Context

The cultural record for "Greek" confirms the name match and existence of items:

{
  "id": 37527534,
  "name": "Greek",
  "objectcount": 9203
}

Expected Behavior

Filtering by culture=Greek should return the same results as filtering by culture=37527534.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions