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 | aa410b7d8e089228ef1bc0d09512d7e00117b9d5 (patch) | |
tree | 5ba0d2791fac02b4f82b0601772363399815d2f5 | |
parent | 277d9389945df1ca38b3ae356c5c9752cee72cc9 (diff) | |
download | Ishtar-aa410b7d8e089228ef1bc0d09512d7e00117b9d5.tar.bz2 Ishtar-aa410b7d8e089228ef1bc0d09512d7e00117b9d5.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_'):] |