diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-02-13 23:46:30 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-24 19:38:56 +0200 |
commit | 21fc0f481da2f079ae42f21976d32a8bc75ecd05 (patch) | |
tree | a6a104c79a6725c044ea8a83e5a05ff7320d8205 /ishtar_common | |
parent | 1a9167bbea423aed732594241ae50eeefd84f79e (diff) | |
download | Ishtar-21fc0f481da2f079ae42f21976d32a8bc75ecd05.tar.bz2 Ishtar-21fc0f481da2f079ae42f21976d32a8bc75ecd05.zip |
Fix migration on new DB - fix filter field when no gis db is available
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/forms.py | 3 | ||||
-rw-r--r-- | ishtar_common/migrations/0081_recreate_m2m_history.py | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index 0bb97b980..57f48ff95 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -554,7 +554,8 @@ class IshtarForm(forms.Form, BSForm): for profile_key in self.PROFILE_FILTER: if not getattr(profile, profile_key): for field_key in self.PROFILE_FILTER[profile_key]: - self.fields.pop(field_key) + if field_key in self.fields.keys(): + self.fields.pop(field_key) if getattr(self, 'confirm', False): return for field in self.TYPES: diff --git a/ishtar_common/migrations/0081_recreate_m2m_history.py b/ishtar_common/migrations/0081_recreate_m2m_history.py index 3d7f28bb6..3cbe5cdbc 100644 --- a/ishtar_common/migrations/0081_recreate_m2m_history.py +++ b/ishtar_common/migrations/0081_recreate_m2m_history.py @@ -41,5 +41,4 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunPython(recreate_m2m_migrations) ] |