Commits

Mike Bayer committed 71b6bce

moved iteration of props so that props can set up self-referring backref properties without getting a "list changed during iteration" error

  • Participants
  • Parent commits 96b7b71

Comments (0)

Files changed (1)

lib/sqlalchemy/mapping/mapper.py

                     self.props[key].parent = self
                     self.props[key].key = None  # force re-init
 
-        for key, prop in self.props.iteritems():
+        l = [(key, prop) for key, prop in self.props.iteritems()]
+        for key, prop in l:
             if getattr(prop, 'key', None) is None:
                 prop.init(key, self)