Commits

Mike Bayer committed 13efe23

more fix to one-to-one: 'unchanged_items' can be [None] also with one to one so check for this
during delete

  • Participants
  • Parent commits 028735d

Comments (0)

Files changed (2)

lib/sqlalchemy/mapping/properties.py

             for obj in deplist:
                 childlist = getlist(obj, False)
                 for child in childlist.deleted_items() + childlist.unchanged_items():
-                    self._synchronize(obj, child, None, True)
-                    uowcommit.register_object(child, postupdate=self.post_update)
+                    if child is not None:
+                        self._synchronize(obj, child, None, True)
+                        uowcommit.register_object(child, postupdate=self.post_update)
         elif self.association is not None:
             # manage association objects.
             for obj in deplist:
         self.assert_(p.jack is None)
         objectstore.commit() 
 
+	j.delete()
+	objectstore.commit()
+
 if __name__ == "__main__":    
     testbase.main()