Kaydet (Commit) f5ce1793 authored tarafından Luke Plant's avatar Luke Plant

Small cleanup in prefetch_related code

üst 4fea46a0
......@@ -483,7 +483,7 @@ class ForeignRelatedObjectsDescriptor(object):
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])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment