sebzur/django-rest-framework — comment on commit abc7439f8ddcd1ec2540a664ce2f025907c1ce67
File: djangorestframework/mixins.py line 77
By sebzur:

This method (build_query) is defined to behave exactly as the previous code in mixins, however there's something strange there: if args are provided it would be enough to use only pk in query - merging pk with any other elements from kwargs has no effect. The comment was just to mark this (and indeed should not be present in the commit)

If args are present, it would be cleaner if this method by default returns simply Q(pk=args[-1]) - it was intentionally left to return Q object build with pk merged with kwargs, but I feel I should change it in the code candidate for the pull. What do You think?