Skip to content

Add none method to FakeQuerySet#204

Open
engineervix wants to merge 1 commit intowagtail:mainfrom
engineervix:feature/add-none-method-to-fakequeryset
Open

Add none method to FakeQuerySet#204
engineervix wants to merge 1 commit intowagtail:mainfrom
engineervix:feature/add-none-method-to-fakequeryset

Conversation

@engineervix
Copy link
Copy Markdown

This PR implements the none() method on FakeQuerySet to match Django's QuerySet API.

Motivation

Django's QuerySet has a none() method that returns an empty queryset. This is useful for:

  • Conditional query building where you want to explicitly return nothing
  • Testing code that uses .none()
  • API completeness with Django's QuerySet interface

Currently, FakeQuerySet doesn't implement this method, which can cause issues when testing code that uses it.


Django implementation: https://github.com/django/django/blob/2b0f24e6/django/db/models/query.py#L1604

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant