Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error when filtering with property #59

Closed
vincentsarago opened this issue Nov 2, 2022 · 2 comments
Closed

Type error when filtering with property #59

vincentsarago opened this issue Nov 2, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vincentsarago
Copy link
Member

# When filtering on a string (NOK)
curl http://127.0.0.1:8081/collections/public.landsat_wrs/items?pr=013001
{
  "detail": "str contain unsafe (non word) characters: "character varying""
}

# When filtering on an integer (OK)
curl http://127.0.0.1:8081/collections/public.landsat_wrs/items?path=13
{
  "type": "FeatureCollection",
  ...
}

w.append(
logic.V(col.name)
== logic.S(pg_funcs.cast(pg_funcs.cast(val, "text"), col.type))
)

because in ☝️ we are calling https://github.com/samuelcolvin/buildpg/blob/master/buildpg/components.py#L58-L61 with character varying (col.type)

@vincentsarago vincentsarago added the bug Something isn't working label Nov 2, 2022
@vincentsarago
Copy link
Member Author

it might be a buildpg bug : samuelcolvin/buildpg#41

@vincentsarago
Copy link
Member Author

done in #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants