toastdriven/django-tastypie — pull request #433 by ross (2012-04-06 20:03:50+00:00)
Title: avoid double query on the_m2ms, 715 & 726

the_m2ms is queried twice, once in an if and again in the for m2m in the_m2ms. if the_m2ms is None prevents the extra query, but may or may not be valid depending on what all values the_m2ms could hold.