From ce17a92be9c98753911987d12bf30ea9485e8e3f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 6 Oct 2020 19:44:11 +0200 Subject: Complete identifier field: database - profile settings - save --- archaeological_files/models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'archaeological_files/models.py') diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 8afd57d01..455d65af8 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -34,8 +34,8 @@ from ishtar_common.utils import cached_label_changed, get_cache, \ from ishtar_common.models import GeneralType, BaseHistorizedItem, \ OwnPerms, Person, Organization, Town, \ Dashboard, DashboardFormItem, ValueGetter, ShortMenuItem, \ - OperationType, get_external_id, post_save_cache, Document, HistoryModel, \ - SearchAltName, SearchVectorConfig, DocumentItem + OperationType, get_generated_id, post_save_cache, Document, HistoryModel, \ + SearchAltName, SearchVectorConfig, DocumentItem, CompleteIdentifierItem from ishtar_common.models_common import HistoricalRecords, Department @@ -86,8 +86,8 @@ if settings.COUNTRY == 'fr': post_delete.connect(post_save_cache, sender=SaisineType) -class File(ClosedItem, DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter, - ShortMenuItem, DashboardFormItem, ParcelItem): +class File(ClosedItem, DocumentItem, BaseHistorizedItem, CompleteIdentifierItem, + OwnPerms, ValueGetter, ShortMenuItem, DashboardFormItem, ParcelItem): SLUG = 'file' SHOW_URL = 'show-file' DELETE_URL = 'delete-file' @@ -716,7 +716,7 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter, updated += self.update_corpo_general_contractor() if not self.external_id or self.auto_external_id: - external_id = get_external_id('file_external_id', self) + external_id = get_generated_id('file_external_id', self) if external_id != self.external_id: updated = True self.auto_external_id = True -- cgit v1.2.3