changeset f03f5e80816e in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=f03f5e80816e
description:
        Iterate over a copy of keys in products_by_location

        As the quantities dictionary may change during the iteration, we must 
loop over
        a copy of the keys.

        issue8978
        review260771002
diffstat:

 product.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r a90bc87320bc -r f03f5e80816e product.py
--- a/product.py        Sat Dec 28 18:16:28 2019 +0100
+++ b/product.py        Mon Jan 20 11:08:53 2020 +0100
@@ -203,7 +203,7 @@
 
         if wh_to_add:
             for wh, storage in wh_to_add.items():
-                for key in quantities:
+                for key in list(quantities.keys()):
                     if key[0] == storage:
                         quantities[(wh,) + key[1:]] = quantities[key]
                         if storage in storage_to_remove:

Reply via email to