diff options
Diffstat (limited to 'archaeological_operations/models.py')
| -rw-r--r-- | archaeological_operations/models.py | 21 | 
1 files changed, 12 insertions, 9 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 07016a5e8..55594bcd9 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -693,7 +693,7 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem,          SearchVectorConfig("common_name"),          SearchVectorConfig("common_name", "local"),          SearchVectorConfig("in_charge__cached_label"), -        SearchVectorConfig("name_of_the_protagonist"), +        SearchVectorConfig("protagonist__cached_label"),          SearchVectorConfig("official_report_number"),          SearchVectorConfig("old_code"),          SearchVectorConfig("operation_type__label"), @@ -1048,21 +1048,24 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem,      seizure_name = models.TextField(_("Seizure name"), blank=True, null=True)      official_report_number = models.TextField(_("Official report number"),                                                blank=True, null=True) -    name_of_the_protagonist = models.TextField(_("Name of the protagonist"), -                                               blank=True, null=True) -    applicant_authority = models.TextField(_("Applicant authority"), -                                           blank=True, null=True) -    minutes_writer = models.TextField(_("Writer of the minutes"), -                                      blank=True, null=True) +    protagonist = models.ForeignKey( +        Person, verbose_name=_("Name of the protagonist"), +        blank=True, null=True, related_name="operation_protagonist") +    applicant_authority = models.ForeignKey( +        Organization, verbose_name=_("Applicant authority"), +        blank=True, null=True, related_name="operation_applicant_authority") +    minutes_writer = models.ForeignKey( +        Person, verbose_name=_("Writer of the minutes"), +        blank=True, null=True, related_name="minutes_writer")      cached_towns_label = models.TextField(          _("Cached town label"), blank=True, null=True,          help_text=_("Generated automatically - do not edit")      ) -    cached_periods =  models.TextField( +    cached_periods = models.TextField(          _("Cached periods label"), blank=True, null=True,          help_text=_("Generated automatically - do not edit")      ) -    cached_remains =  models.TextField( +    cached_remains = models.TextField(          _("Cached remains label"), blank=True, null=True,          help_text=_("Generated automatically - do not edit")      )  | 
