Skip to content

Instantly share code, notes, and snippets.

@brunomichetti
Created September 13, 2022 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunomichetti/63f82180397af98d21a3cb550113c068 to your computer and use it in GitHub Desktop.
Save brunomichetti/63f82180397af98d21a3cb550113c068 to your computer and use it in GitHub Desktop.
In [50]: User.objects.none()
Out[50]: <QuerySet []>
In [51]: connection.queries
Out[51]: []
In [52]: User.objects.filter(pk__in=[])
Out[52]: <QuerySet []>
In [53]: connection.queries
Out[53]: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment