Ticket #2593: manipulator_override_global.patch

File manipulator_override_global.patch, 762 bytes (added by Chris Beaven, 18 years ago)
  • django/db/models/options.py

     
    138138
    139139    def get_follow(self, override=None):
    140140        follow = {}
     141        if override:
     142            default_override = override.get('*', None)
    141143        for f in self.fields + self.many_to_many + self.get_all_related_objects():
    142             if override and override.has_key(f.name):
    143                 child_override = override[f.name]
     144            if override:
     145                child_override = override.get(f.name, default_override)
    144146            else:
    145147                child_override = None
    146148            fol = f.get_follow(child_override)
Back to Top