diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
| -rw-r--r-- | archaeological_finds/models_finds.py | 16 | 
1 files changed, 3 insertions, 13 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index f8cc34e61..9e377d1f6 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -32,7 +32,7 @@ from django.utils.translation import ugettext_lazy as _, pgettext_lazy, \  from ishtar_common.data_importer import post_importer_action, ImporterError  from ishtar_common.utils import cached_label_changed, post_save_point, \ -    m2m_historization_changed, HISTORY_M2M_SPLIT +    m2m_historization_changed  from ishtar_common.alternative_configs import ALTERNATE_CONFIGS @@ -41,7 +41,7 @@ from ishtar_common.models import Document, GeneralType, \      HistoricalRecords, OwnPerms, Person, Basket, post_save_cache, \      ValueGetter, get_current_profile, IshtarSiteProfile, PRIVATE_FIELDS, \      SpatialReferenceSystem, BulkUpdatedItem, ExternalIdManager, QuickAction, \ -    MainItem, document_attached_changed +    MainItem, document_attached_changed, HistoryModel  from archaeological_operations.models import AdministrativeAct, Operation  from archaeological_context_records.models import ContextRecord, Dating @@ -1199,7 +1199,7 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,          help_text=_(u"Related treatments when no new find is created"))      cached_label = models.TextField(_(u"Cached name"), null=True, blank=True,                                      db_index=True) -    history = HistoricalRecords() +    history = HistoricalRecords(bases=[HistoryModel])      BASKET_MODEL = FindBasket      class Meta: @@ -1233,16 +1233,6 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,          return u" ; ".join([unicode(dating) for dating in self.datings.all()])      @property -    def dating_list(self): -        if self.historical_datings: -            return [ -                Dating.history_decompress(v) -                for v in self.historical_datings.split(HISTORY_M2M_SPLIT) -            ] -        else: -            return self.datings.all() - -    @property      def excavation_ids(self):          return u" - ".join(              [base_find['excavation_id']  | 
