Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Small cleanup in prefetch_related code

  • Loading branch information...
commit f5ce1793a88e6aca1ccefd7bdec622587357df19 1 parent 4fea46a
@spookylukey spookylukey authored
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])
Please sign in to comment.
Something went wrong with that request. Please try again.