diff options
Diffstat (limited to 'archaeological_operations/forms.py')
| -rw-r--r-- | archaeological_operations/forms.py | 4 | 
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): | 
