diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-09-16 17:25:35 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:20:58 +0100 |
commit | 2d713b0230c0be9b89d23dfde36423027a72309e (patch) | |
tree | d62d25974c7a4c8ea315245dc6e30d06d34fa9bc | |
parent | 4970a276e34a9fd14cae13281242b23755d5f5e9 (diff) | |
download | Ishtar-2d713b0230c0be9b89d23dfde36423027a72309e.tar.bz2 Ishtar-2d713b0230c0be9b89d23dfde36423027a72309e.zip |
Migration to Django 2.2 - fixes
- fix parcel form
- fix imports
-rw-r--r-- | ishtar_common/data_importer.py | 2 | ||||
-rw-r--r-- | ishtar_common/wizards.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py index b7653af74..9dbd45e93 100644 --- a/ishtar_common/data_importer.py +++ b/ishtar_common/data_importer.py @@ -1877,7 +1877,7 @@ class Importer(object): except Exception as e: self.errors.append((self.idx_line, None, str(e))) return - if not hasattr(field_object, "rel") or not field_object.rel: + if not hasattr(field_object, "related_model") or not field_object.related_model: return if type(data[attribute]) == list: # extract the first item from list diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 1aafef6e7..a22901953 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -917,7 +917,7 @@ class Wizard(IshtarWizard): and ( hasattr(field, "default") and ( - not field.default + field.default is None or field.default == NOT_PROVIDED ) ) |