Closed SafaAlfulaij closed 3 years ago
Looks good, do you want to submit a pull request? I'd split up the ReferenceModel.objects.filter()
query and maybe add one self.assertEqual
for each case (ancestors, isnull and descendants) and maybe also verify that exclude()
works too.
Doing something like:
test_field__in=node_field.ancetors()
raises an error:Check this diff please (contains a "fix"):