django/django — pull request #895 by mrmachine (2013-03-11 05:11:19+00:00)
Title: Fixed #16436 -- ``annotate().select_related().only()`` = ``ValueError: i...

...nvalid literal for int() with base 10``

Correctly calculate the ``aggregate_start`` offset from loaded fields,
if any are deferred, instead of ``self.query.select`` which includes all
fields on the model.