summaryrefslogtreecommitdiff
path: root/chimere/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-24 13:14:33 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-24 13:14:33 +0200
commit8285908b42d135ed7b7fa1773061e83acf883b5b (patch)
tree9066edd72925ab9f0d109235b3598bdaedef71ff /chimere/forms.py
parent50a238daaba8feb6a1572dd1ec889103da11eae1 (diff)
downloadChimère-8285908b42d135ed7b7fa1773061e83acf883b5b.tar.bz2
Chimère-8285908b42d135ed7b7fa1773061e83acf883b5b.zip
New version: fix tests - Fix CSV export
Diffstat (limited to 'chimere/forms.py')
-rw-r--r--chimere/forms.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/chimere/forms.py b/chimere/forms.py
index cc8661f..69778de 100644
--- a/chimere/forms.py
+++ b/chimere/forms.py
@@ -796,9 +796,11 @@ class AreaAdminForm(forms.ModelForm):
except ValueError:
v = None
if not v:
- args[0]._mutable = True
+ if hasattr(args[0], "_mutable"):
+ args[0]._mutable = True
args[0][k] = None
- args[0]._mutable = False
+ if hasattr(args[0], "_mutable"):
+ args[0]._mutable = False
if 'instance' in keys and keys['instance']:
instance = keys['instance']
dct = {'area': (instance.upper_left_corner,