If I have two items in a collection, one with a category of 'folder' and the other with a category of 'dashboard', I use a find_one query such as
print "What happens with an exclusive and without the overriding"
no_folder = Folder.find_one(Q('category', 'eq', 'folder') and Q('category', 'eq', 'dashboard'))
print no_folder.name
and instead of finding no items (as I would expect), I get the Dashboard item. If I were to switch the search terms,
print "What happens with an exclusive and without the overriding"
no_folder = Folder.find_one(Q('category', 'eq', 'dashboard') and Q('category', 'eq', 'folder'))
print no_folder.name
I get the folder item.
If I have two items in a collection, one with a category of 'folder' and the other with a category of 'dashboard', I use a find_one query such as
and instead of finding no items (as I would expect), I get the Dashboard item. If I were to switch the search terms,
I get the folder item.