Skip to content

icontains lookup doesn't work with dictionary params #142

Open
@yushkovskiy

Description

@yushkovskiy

ProgrammingError: operator does not exist: text -> unknown
LINE 1: ...act" WHERE (UPPER("app_model"."hstorefield"::text)->'custom_...
^

I believe that problem is in replacement of '::text' to '::hstore'. The condition
https://github.com/djangonauts/django-hstore/blob/master/django_hstore/lookups.py#L82
checks that lhs ends with '::text' cast, but in case of icontains it ends with '::text)' (at least with django 1.7)

python version: 2.7.6
django version: 1.7.10
django-hstore version: 1.4.1

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