diff options
Diffstat (limited to 'archaeological_finds/forms.py')
-rw-r--r-- | archaeological_finds/forms.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index 014a094bc..4a93ffce4 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -897,12 +897,14 @@ class PreservationForm(CustomForm, ManageOldType): def __init__(self, *args, **kwargs): super(PreservationForm, self).__init__(*args, **kwargs) - self.fields['insurance_value'].label = u"{} ({})".format( - str(self.fields['insurance_value'].label), - get_current_profile().currency) - self.fields['estimated_value'].label = u"{} ({})".format( - str(self.fields['estimated_value'].label), - get_current_profile().currency) + if 'insurance_value' in self.fields: + self.fields['insurance_value'].label = "{} ({})".format( + str(self.fields['insurance_value'].label), + get_current_profile().currency) + if 'estimated_value' in self.fields: + self.fields['estimated_value'].label = "{} ({})".format( + str(self.fields['estimated_value'].label), + get_current_profile().currency) class DateForm(ManageOldType, forms.Form): |