diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-03-06 12:02:37 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-03-06 12:02:37 +0100 |
commit | e65e8fe36c57651d272ace86b539560cbc21fef6 (patch) | |
tree | 8a658f181a4fc2bcb5040792ab7aa5ce824170fb /archaeological_context_records/forms.py | |
parent | 0af5234b12b1b6a6b819800766db4cf855315792 (diff) | |
download | Ishtar-e65e8fe36c57651d272ace86b539560cbc21fef6.tar.bz2 Ishtar-e65e8fe36c57651d272ace86b539560cbc21fef6.zip |
Parcel not mandatory: change required in form (refs #3962)
Diffstat (limited to 'archaeological_context_records/forms.py')
-rw-r--r-- | archaeological_context_records/forms.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 61460ab3b..6e7c3602e 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -227,7 +227,10 @@ class RecordFormGeneral(CustomForm, ManageOldType): if 'files' in kwargs: kwargs.pop('files') super(RecordFormGeneral, self).__init__(*args, **kwargs) + profile = IshtarSiteProfile.get_current_profile() self.fields['parcel'].choices = [('', '--')] + if not profile.parcel_mandatory: + self.fields['parcel'].required = False site_label = IshtarSiteProfile.get_default_site_label() self.fields['archaeological_site'].label = site_label |