summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-07-15 19:22:49 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2014-07-15 19:22:49 +0200
commit3c4675c7d2f657a5dce8bf55cc8b6a3289197943 (patch)
tree195f2dba6fccee16cea401e1d440156449476ec3 /archaeological_operations/forms.py
parent7c5c1f73ba17425c3737e96bbc600be43608b0a2 (diff)
downloadIshtar-3c4675c7d2f657a5dce8bf55cc8b6a3289197943.tar.bz2
Ishtar-3c4675c7d2f657a5dce8bf55cc8b6a3289197943.zip
Clean act type script (refs #1949)
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index efbd279ed..0d01c7f0e 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -383,7 +383,9 @@ class OperationFormGeneral(forms.Form):
super(OperationFormGeneral, self).__init__(*args, **kwargs)
self.fields['operation_type'].choices = models.OperationType.get_types()
self.fields['operation_type'].help_text = models.OperationType.get_help()
- if kwargs and kwargs['data']: # data POSTED
+ # data POSTED
+ if kwargs and kwargs['data'] \
+ and 'readonly' in self.fields['operation_code'].widget.attrs:
self.fields['operation_code'].widget.attrs.pop('readonly')
def clean(self):