Maybe this is some kind of specific sqlite problem, but I really don't know. Just an idea of what I will do.
You can look at the actual SQL query and check if this is correct:
# print PrivateMessage.objects.filter(deleted_from=False).query
Check what values and types of model field deleted_from:
# [(m.deleted_from, type(m.deleted_from)) for m in PrivateMessage.objects.all()]
source
share