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
commitea0d4565ce035c49fd08c2791df71bd8d36a5579 (patch)
tree195f2dba6fccee16cea401e1d440156449476ec3 /archaeological_operations/forms.py
parent2ec9da827e25557d89266044038f98a7f3c6c08d (diff)
downloadIshtar-ea0d4565ce035c49fd08c2791df71bd8d36a5579.tar.bz2
Ishtar-ea0d4565ce035c49fd08c2791df71bd8d36a5579.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):