Skip to content

Commit

Permalink
Source concepts/mappings indexes views | added dummy serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Oct 28, 2021
1 parent b553a62 commit d0fc518
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/common/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
class RootSerializer(Serializer): # pylint: disable=abstract-method
version = CharField()
routes = JSONField()


class TaskSerializer(Serializer):
pass
5 changes: 5 additions & 0 deletions core/sources/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
ConceptContainerExportMixin, ConceptContainerProcessingMixin, ConceptContainerExtraRetrieveUpdateDestroyView
from core.common.permissions import CanViewConceptDictionary, CanEditConceptDictionary, HasAccessToVersionedObject, \
CanViewConceptDictionaryVersion
from core.common.serializers import TaskSerializer
from core.common.swagger_parameters import q_param, limit_param, sort_desc_param, sort_asc_param, exact_match_param, \
page_param, verbose_param, include_retired_param, updated_since_param, include_facets_header, compress_header
from core.common.tasks import export_source, delete_source, index_source_concepts, index_source_mappings
Expand Down Expand Up @@ -284,6 +285,8 @@ def update(self, request, *args, **kwargs):


class SourceConceptsIndexView(SourceBaseView):
serializer_class = TaskSerializer

def get_queryset(self):
return Source.get_base_queryset(compact_dict_by_values(self.get_filter_params()))

Expand All @@ -303,6 +306,8 @@ def post(self, request, *args, **kwargs): # pylint: disable=unused-argument


class SourceMappingsIndexView(SourceBaseView):
serializer_class = TaskSerializer

def get_queryset(self):
return Source.get_base_queryset(compact_dict_by_values(self.get_filter_params()))

Expand Down

0 comments on commit d0fc518

Please sign in to comment.