diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2013-04-04 22:43:13 +0000 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2013-04-04 22:43:13 +0000 |
| commit | ee8c9ad6004ab35e409c7041a0eba214b45c36d7 (patch) | |
| tree | a2c624b1ce76c6d57a8a156766e4863710d8ae19 /archaeological_finds | |
| parent | 56aea239caffef95c481aac3b77a8d43e8d3ca35 (diff) | |
| parent | e51684c2adb656d3ef14e40e649e280a6c0bf1b8 (diff) | |
| download | Ishtar-ee8c9ad6004ab35e409c7041a0eba214b45c36d7.tar.bz2 Ishtar-ee8c9ad6004ab35e409c7041a0eba214b45c36d7.zip | |
Merge branch 'master' of lysithea.proxience.net:/home/proxience/git/ishtar
Diffstat (limited to 'archaeological_finds')
| -rw-r--r-- | archaeological_finds/forms.py | 4 | ||||
| -rw-r--r-- | archaeological_finds/models.py | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index c5480d8a8..feaad0e23 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -39,7 +39,7 @@ import models from ishtar_common import widgets from ishtar_common.forms import FinalForm, FormSet, FloatField, \ - formset_factory, get_now, get_form_selection, reverse_lazy + formset_factory, get_now, get_form_selection, reverse_lazy, TableSelect from ishtar_common.forms_common import get_town_field, \ SourceForm, SourceSelect, SourceDeletionForm, AuthorFormset from archaeological_context_records.forms import RecordFormSelection @@ -81,7 +81,7 @@ class DateForm(forms.Form): self.fields['dating__dating_type'].choices = DatingType.get_types() self.fields['dating__dating_type'].help_text = DatingType.get_help() -class FindSelect(forms.Form): +class FindSelect(TableSelect): base_finds__context_record__parcel__town = get_town_field() base_finds__context_record__operation__year = forms.IntegerField( label=_(u"Year")) diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index a02cb4402..ce0df10cf 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -82,7 +82,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms): return settings.JOINT.join(finds) def _real_label(self): - if not self.context_record.parcel.operation.code_patriarche: + if not self.context_record.parcel \ + or not self.context_record.parcel.operation \ + or not self.context_record.parcel.operation.code_patriarche: return find = self.get_last_find() lbl = find.label or self.label @@ -92,7 +94,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms): lbl) if it]) def _temp_label(self): - if self.context_record.parcel.operation.code_patriarche: + if not self.context_record.parcel \ + or not self.context_record.parcel.operation \ + or not self.context_record.parcel.operation.code_patriarche: return find = self.get_last_find() lbl = find.label or self.label |
