summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-04 15:30:47 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-04 15:30:47 +0200
commit303a95a0cdbeb2d64b8a3fdf5143bcdbcec22270 (patch)
tree52de5ad50bc11287bb119563043f6153e596d9b4 /archaeological_operations/models.py
parent6f487e1b480365ff4a64500dc40ff2da6d92d5b2 (diff)
downloadIshtar-303a95a0cdbeb2d64b8a3fdf5143bcdbcec22270.tar.bz2
Ishtar-303a95a0cdbeb2d64b8a3fdf5143bcdbcec22270.zip
Serializers: operations - manage recordrelation filter
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 8f5f1aace..7a5174743 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -42,6 +42,7 @@ from ishtar_common.models import BaseHistorizedItem, Dashboard, \
ShortMenuItem, SourceType, Town, ValueGetter, get_current_profile, \
document_attached_changed, HistoryModel, SearchAltName, \
GeoItem, QRCodeItem, SearchVectorConfig, DocumentItem, QuickAction, MainItem
+from ishtar_common.model_managers import UUIDModelManager
from ishtar_common.utils import cached_label_changed, \
force_cached_label_changed, mode, m2m_historization_changed, post_save_geo
@@ -579,11 +580,6 @@ class ClosedItem(object):
return {'date': date, 'user': user}
-class OperationManager(models.GeoManager):
- def get_by_natural_key(self, uuid):
- return self.get(uuid=uuid)
-
-
class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem,
GeoItem, OwnPerms, ValueGetter, MainItem,
DashboardFormItem, RelationItem):
@@ -721,7 +717,7 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem,
}
CACHED_LABELS = ['cached_label', 'cached_towns_label', 'cached_periods',
'cached_remains']
- objects = OperationManager()
+ objects = UUIDModelManager()
# alternative names of fields for searches
ALT_NAMES = {