From 421b67ee146838bc8c50089ee40b0841d4d57021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Morel?= Date: Wed, 29 Jan 2020 18:12:55 +0100 Subject: [PATCH] fix description route --- backend/substrapp/views/aggregatealgo.py | 4 ++-- backend/substrapp/views/algo.py | 4 ++-- backend/substrapp/views/compositealgo.py | 4 ++-- backend/substrapp/views/datamanager.py | 4 ++-- backend/substrapp/views/objective.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/substrapp/views/aggregatealgo.py b/backend/substrapp/views/aggregatealgo.py index f532a16c4..49c5af5dc 100644 --- a/backend/substrapp/views/aggregatealgo.py +++ b/backend/substrapp/views/aggregatealgo.py @@ -203,6 +203,6 @@ class AggregateAlgoPermissionViewSet(PermissionMixin, def file(self, request, *args, **kwargs): return self.download_file(request, 'file', 'content') - @action(detail=True) - def description(self, request, *args, **kwargs): + @action(detail=True, url_path='description', url_name='description') + def description_(self, request, *args, **kwargs): return self.download_file(request, 'description') diff --git a/backend/substrapp/views/algo.py b/backend/substrapp/views/algo.py index e5e5e1363..bfeed9a01 100644 --- a/backend/substrapp/views/algo.py +++ b/backend/substrapp/views/algo.py @@ -204,6 +204,6 @@ class AlgoPermissionViewSet(PermissionMixin, def file(self, request, *args, **kwargs): return self.download_file(request, 'file', 'content') - @action(detail=True) - def description(self, request, *args, **kwargs): + @action(detail=True, url_path='description', url_name='description') + def description_(self, request, *args, **kwargs): return self.download_file(request, 'description') diff --git a/backend/substrapp/views/compositealgo.py b/backend/substrapp/views/compositealgo.py index a773fad0b..47a9d963d 100644 --- a/backend/substrapp/views/compositealgo.py +++ b/backend/substrapp/views/compositealgo.py @@ -203,6 +203,6 @@ class CompositeAlgoPermissionViewSet(PermissionMixin, def file(self, request, *args, **kwargs): return self.download_file(request, 'file', 'content') - @action(detail=True) - def description(self, request, *args, **kwargs): + @action(detail=True, url_path='description', url_name='description') + def description_(self, request, *args, **kwargs): return self.download_file(request, 'description') diff --git a/backend/substrapp/views/datamanager.py b/backend/substrapp/views/datamanager.py index 34b9b9b9b..5a29427ed 100644 --- a/backend/substrapp/views/datamanager.py +++ b/backend/substrapp/views/datamanager.py @@ -250,8 +250,8 @@ class DataManagerPermissionViewSet(PermissionMixin, serializer_class = DataManagerSerializer ledger_query_call = 'queryDataManager' - @action(detail=True) - def description(self, request, *args, **kwargs): + @action(detail=True, url_path='description', url_name='description') + def description_(self, request, *args, **kwargs): return self.download_file(request, 'description') @action(detail=True) diff --git a/backend/substrapp/views/objective.py b/backend/substrapp/views/objective.py index 1295e86ca..55802f89d 100644 --- a/backend/substrapp/views/objective.py +++ b/backend/substrapp/views/objective.py @@ -250,8 +250,8 @@ class ObjectivePermissionViewSet(PermissionMixin, serializer_class = ObjectiveSerializer ledger_query_call = 'queryObjective' - @action(detail=True) - def description(self, request, *args, **kwargs): + @action(detail=True, url_path='description', url_name='description') + def description_(self, request, *args, **kwargs): return self.download_file(request, 'description') @action(detail=True)