[Sqlalchemy-tickets] Issue #3191: Sorting order is messed up with ordering_list (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
|
From: Aleksandr O. <iss...@bi...> - 2014-09-09 09:40:38
|
New issue 3191: Sorting order is messed up with ordering_list https://bitbucket.org/zzzeek/sqlalchemy/issue/3191/sorting-order-is-messed-up-with Aleksandr Osipov: Sorting order is messed up if we replace existing list with new one with some items removed. This happens in the function orm.collections.bulk_replace, when removing items missing in new collection from old one in order to fire events. Calling .remove method of ordering_list cause reordering of items in old collection, but this also affects ordering in new collection. Changing two loops in orm.collections.bulk_replace seems to solve the problems. |