Skip to content
Browse files

Small cleanup in prefetch_related code

  • Loading branch information...
1 parent 4fea46a commit f5ce1793a88e6aca1ccefd7bdec622587357df19 @spookylukey spookylukey committed Jun 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/models/fields/related.py
View
2 django/db/models/fields/related.py
@@ -483,7 +483,7 @@ def get_query_set(self):
return qs
def get_prefetch_query_set(self, instances):
- rel_obj_attr = attrgetter(rel_field.get_attname())
+ rel_obj_attr = attrgetter(rel_field.attname)
instance_attr = attrgetter(attname)
instances_dict = dict((instance_attr(inst), inst) for inst in instances)
db = self._db or router.db_for_read(self.model, instance=instances[0])

0 comments on commit f5ce179

Please sign in to comment.
Something went wrong with that request. Please try again.