From e56c494af06d0845d1980132751f2b5d28a12811 Mon Sep 17 00:00:00 2001 From: Sny Date: Mon, 19 Apr 2021 20:06:52 +0530 Subject: [PATCH] OpenConceptLab/ocl_issues#720 | Source/Collection/Concept/Mapping | external_id is indexed --- core/collections/documents.py | 1 + core/collections/models.py | 1 + core/concepts/documents.py | 1 + core/concepts/models.py | 1 + core/mappings/models.py | 1 + core/sources/documents.py | 1 + core/sources/models.py | 1 + 7 files changed, 7 insertions(+) diff --git a/core/collections/documents.py b/core/collections/documents.py index 4f106ff50..93a1c8725 100644 --- a/core/collections/documents.py +++ b/core/collections/documents.py @@ -38,6 +38,7 @@ class Django: 'retired', 'experimental', 'locked_date', + 'external_id', ] @staticmethod diff --git a/core/collections/models.py b/core/collections/models.py index e2d54d0f4..7d0e20d90 100644 --- a/core/collections/models.py +++ b/core/collections/models.py @@ -38,6 +38,7 @@ class Collection(ConceptContainerModel): 'custom_validation_schema': {'sortable': False, 'filterable': True, 'facet': True}, 'canonical_url': {'sortable': True, 'filterable': True}, 'experimental': {'sortable': False, 'filterable': True, 'facet': True}, + 'external_id': {'sortable': False, 'filterable': True, 'facet': False, 'exact': False}, } class Meta: diff --git a/core/concepts/documents.py b/core/concepts/documents.py index ffee1ef96..24776b4b6 100644 --- a/core/concepts/documents.py +++ b/core/concepts/documents.py @@ -34,6 +34,7 @@ class Django: model = Concept fields = [ 'version', + 'external_id', ] @staticmethod diff --git a/core/concepts/models.py b/core/concepts/models.py index 59c78befc..adf492e53 100644 --- a/core/concepts/models.py +++ b/core/concepts/models.py @@ -143,6 +143,7 @@ class Meta: 'collection': {'sortable': False, 'filterable': True, 'facet': True}, 'owner': {'sortable': True, 'filterable': True, 'facet': True, 'exact': True}, 'owner_type': {'sortable': False, 'filterable': True, 'facet': True, 'exact': True}, + 'external_id': {'sortable': False, 'filterable': True, 'facet': False, 'exact': False}, } @property diff --git a/core/mappings/models.py b/core/mappings/models.py index 066143aad..8f63af2a3 100644 --- a/core/mappings/models.py +++ b/core/mappings/models.py @@ -91,6 +91,7 @@ class Meta: 'concept_owner_type': {'sortable': False, 'filterable': True, 'facet': True}, 'from_concept_owner_type': {'sortable': False, 'filterable': True, 'facet': True}, 'to_concept_owner_type': {'sortable': False, 'filterable': True, 'facet': True}, + 'external_id': {'sortable': False, 'filterable': True, 'facet': False, 'exact': False}, } @property diff --git a/core/sources/documents.py b/core/sources/documents.py index 849d11cbe..0cdc30a21 100644 --- a/core/sources/documents.py +++ b/core/sources/documents.py @@ -42,6 +42,7 @@ class Django: 'case_sensitive', 'compositional', 'version_needed', + 'external_id', ] @staticmethod diff --git a/core/sources/models.py b/core/sources/models.py index ad5f923d6..9f3210729 100644 --- a/core/sources/models.py +++ b/core/sources/models.py @@ -25,6 +25,7 @@ class Source(ConceptContainerModel): 'canonical_url': {'sortable': True, 'filterable': True}, 'experimental': {'sortable': False, 'filterable': True, 'facet': True}, 'hierarchy_meaning': {'sortable': False, 'filterable': True, 'facet': True}, + 'external_id': {'sortable': False, 'filterable': True, 'facet': False, 'exact': False}, } class Meta: