toastdriven/django-tastypie — pull request #969 by skevy (2013-06-21 07:23:32+00:00)
Title: Reduce number of queries in ToManyField

By checking to see if the_m2ms is null, and not whether it's null or empty, we prevent performing two of the same queries.