Created
September 20, 2012 12:51
-
-
Save tuxcanfly/3755704 to your computer and use it in GitHub Desktop.
django bug?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
User.objects.create(username='admin', email='[email protected]', password='test') | |
ids = User.objects.none().values_list('id', flat=True) | |
print ids # prints [] | |
assert User.objects.exclude(id__in=ids) # AssertionError | |
ids = [] | |
assert User.objects.exclude(id__in=ids) # True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment