Opened 7 years ago

Closed 7 years ago

#27636 closed Bug (invalid)

The filter queryset is dynamic?

Reported by: renpj Owned by: nobody
Component: Database layer (models, ORM) Version: 1.10
Severity: Normal Keywords: queryset
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


Here is an example:

q = ModelA.objects.filter(attr=None)
print q

Ans: <QuerySet:[]>

instance1 = ModelA.objects.create()
print q

Ans: <QuerySet:[instance1]>

It seems that the queryset is dynamic and vary with the model. Is this a bug or not?

Change History (1)

comment:1 by Karen Tracey, 7 years ago

Resolution: invalid
Status: newclosed

This is not a bug, it's documented behavior, see:

(In the future please ask questions on the django-users mailing list:!forum/django-users rather than opening a ticket in the bug tracker.)

Note: See TracTickets for help on using tickets.
Back to Top