Skip to content

Error in is_ and isnot Filters in API Requests #54

@gnc-git

Description

@gnc-git

Description
We have encountered an issue in the API when using the is_ and isnot filters for nullability checks, specifically on the email field of the User model. This leads to unexpected behavior or errors in the response. Test cases demonstrating the issue are attached.

Steps to Reproduce
Perform a GET request to the API endpoint /users with a filter to check if email is null (e.g., ?filter=[{"name": "email", "op": "is_", "val": null}]).
Perform a similar GET request with a filter to check if email is not null (e.g., ?filter=[{"name": "email", "op": "isnot", "val": null}]).

Expected Behavior
The API should correctly process these filter requests, returning users whose email fields match the specified conditions (either null or not null).

Actual Behavior
The API is either not returning the correct set of users (those with null or not null email fields), or it's causing an SQL syntax error, particularly when using the is_ and isnot operations.

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