2👍
null_type_tags = Tags.objects.filter(type__isnull=True)
queries = Query.objects.filter(tags__in=null_type_tags)
but untested..
Side Note: You better rename your models, these may shadow the preserved names..
Source:stackexchange.com
2👍
null_type_tags = Tags.objects.filter(type__isnull=True)
queries = Query.objects.filter(tags__in=null_type_tags)
but untested..
Side Note: You better rename your models, these may shadow the preserved names..