changeset 887074758b48 in modules/product:5.2
details: https://hg.tryton.org/modules/product?cmd=changeset;node=887074758b48
description:
Add missing enumerate when looping on non modifiable field
It is missing since changeset 8c885973a93f.
issue8984
review274691002
(grafted from 02e8b1c7accfc5bd68ce5dc49bcdb2d62c5a80b4)
diffstat:
uom.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 712248f8681e -r 887074758b48 uom.py
--- a/uom.py Fri Nov 08 19:45:32 2019 +0100
+++ b/uom.py Mon Jan 20 11:12:47 2020 +0100
@@ -160,7 +160,7 @@
super(Uom, cls).write(*args)
for uom in all_uoms:
- for i, field in ['factor', 'rate', 'category']:
+ for i, field in enumerate(['factor', 'rate', 'category']):
if getattr(uom, field) != old_uom[uom.id][i]:
raise AccessError(
gettext('product.msg_uom_modify_%s' % field,