Browse Source

[MIG] dict.iteritems() does not exist in Python3

pull/1557/head
Iván Todorovich 6 years ago
parent
commit
550fe0dfc9
  1. 4
      base_exception/models/base_exception.py

4
base_exception/models/base_exception.py

@ -227,10 +227,10 @@ class BaseException(models.AbstractModel):
model_exceptions, sub_exceptions, optimize) model_exceptions, sub_exceptions, optimize)
all_exception_ids = [] all_exception_ids = []
for obj, exception_ids in exception_by_rec.iteritems():
for obj, exception_ids in exception_by_rec.items():
obj.exception_ids = [(6, 0, exception_ids)] obj.exception_ids = [(6, 0, exception_ids)]
all_exception_ids += exception_ids all_exception_ids += exception_ids
for rule, exception_ids in exception_by_rule.iteritems():
for rule, exception_ids in exception_by_rule.items():
rule[reverse_field] = [(6, 0, exception_ids.ids)] rule[reverse_field] = [(6, 0, exception_ids.ids)]
if exception_ids: if exception_ids:
all_exception_ids += [rule.id] all_exception_ids += [rule.id]

Loading…
Cancel
Save