Skip to content

build_filter() silently builds an impossible range when created_after > created_before #12

Description

@royalpinto007

Problem

build_filter() with created_after > created_before silently builds an impossible Range(gte, lte) that returns empty with no error, hiding caller bugs.

Where

src/tenantq/search.py (build_filter: range condition appended without ordering check).

Acceptance

Add a failing test first asserting build_filter("acme", created_after=200, created_before=100) raises ValueError. Then fix.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions