summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index be563f34e..a335eb6ec 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -34,7 +34,7 @@ from ishtar_common.utils import cached_label_changed, post_save_point
from ishtar_common.models import GeneralType, ImageModel, BaseHistorizedItem, \
ShortMenuItem, LightHistorizedItem, HistoricalRecords, OwnPerms, Source, \
Person, Basket, post_save_cache, ValueGetter, \
- get_current_profile, ExternalIdManager
+ get_current_profile
from archaeological_operations.models import AdministrativeAct
from archaeological_context_records.models import ContextRecord, Dating
@@ -150,8 +150,7 @@ class BFBulkView(object):
"""
-class BaseFind(ExternalIdManager, BulkUpdatedItem, BaseHistorizedItem,
- OwnPerms):
+class BaseFind(BulkUpdatedItem, BaseHistorizedItem, OwnPerms):
EXTERNAL_ID_KEY = 'base_find_external_id'
EXTERNAL_ID_DEPENDENCIES = ['find']
label = models.TextField(_(u"Free ID"))
@@ -494,8 +493,8 @@ class FBulkView(object):
"""
-class Find(ExternalIdManager, BulkUpdatedItem, ValueGetter,
- BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
+class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, ImageModel,
+ OwnPerms, ShortMenuItem):
EXTERNAL_ID_KEY = 'find_external_id'
CHECK_DICT = dict(CHECK_CHOICES)
SHOW_URL = 'show-find'
@@ -746,10 +745,9 @@ class Find(ExternalIdManager, BulkUpdatedItem, ValueGetter,
return lbl
def get_first_base_find(self):
- q = self.base_finds
- if not q.count():
+ if not self.base_finds.count():
return
- return q.order_by('-pk').all()[0]
+ return self.base_finds.order_by('-pk').all()[0]
@property
def reference(self):