Ticket #2484: num_in_admin_0.diff

File num_in_admin_0.diff, 672 bytes (added by jkocherhans, 18 years ago)
  • django/db/models/manipulators.py

     
    138138            child_follow = self.follow.get(related.name, None)
    139139
    140140            if child_follow:
    141                 obj_list = expanded_data[related.var_name].items()
     141                # expanded_data[related.var_name] won't exist if no related
     142                # objects were displayed on the form.
     143                obj_list = expanded_data.get(related.var_name, {}).items()
    142144                if not obj_list:
    143145                    continue
    144146
Back to Top