diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-18 13:12:40 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-18 13:12:40 +0200 |
commit | f1e6493674b29a7c9f13e40c3b12d5473853613a (patch) | |
tree | 5ba0d2791fac02b4f82b0601772363399815d2f5 | |
parent | ded393c2d979d942ba9a96117bd40112a4626b6d (diff) | |
download | Ishtar-f1e6493674b29a7c9f13e40c3b12d5473853613a.tar.bz2 Ishtar-f1e6493674b29a7c9f13e40c3b12d5473853613a.zip |
Treatment: fix py3 keys() management
-rw-r--r-- | archaeological_finds/models_treatments.py | 2 | ||||
-rw-r--r-- | archaeological_finds/wizards.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 996e03370..120dfe6f2 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -343,7 +343,7 @@ class Treatment(DashboardFormItem, ValueGetter, DocumentItem, """ m2m = {} base_fields = [f.name for f in Find._meta.get_fields()] - for k in resulting_find.keys(): + for k in list(resulting_find.keys()): # if not in base fields should be a m2m if k not in base_fields: values = resulting_find.pop(k) diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py index 675d28474..e1c6814d6 100644 --- a/archaeological_finds/wizards.py +++ b/archaeological_finds/wizards.py @@ -296,7 +296,7 @@ class TreatmentN1Wizard(TreatmentBase): initial = self._update_char_initial_from_finds( initial, find, k, sep='\n') - for k in initial.keys(): + for k in list(initial.keys()): if initial[k] is None: initial.pop(k) return initial @@ -329,7 +329,7 @@ class TreatmentN1Wizard(TreatmentBase): # extract data of the new find dct['resulting_find'] = {} - for k in dct.keys(): + for k in list(dct.keys()): if k.startswith('resulting_') and k != "resulting_find": dct['resulting_find'][ k[len('resulting_'):] |