From 3794a40759382fc70ad42173496e772b126629ca Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Wed, 21 Oct 2020 14:40:39 +0200 Subject: [PATCH] TMSS-379: swapped argument order --- SAS/TMSS/src/tmss/tmssapp/views.py | 2 +- SAS/TMSS/src/tmss/urls.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SAS/TMSS/src/tmss/tmssapp/views.py b/SAS/TMSS/src/tmss/tmssapp/views.py index bfebfb60274..58a389fd6e3 100644 --- a/SAS/TMSS/src/tmss/tmssapp/views.py +++ b/SAS/TMSS/src/tmss/tmssapp/views.py @@ -66,7 +66,7 @@ def get_template_json_schema(request, template:str, name:str, version:str): @swagger_auto_schema(responses={200: 'A JSON object with two properties: group:<the_group_name>, stations:<the_list_of_stations>', 404: 'No such group or template available'}, operation_description="Get a JSON list of stations for the given <station_group> name the the group definitions in the common_schema_template given by <template_name> and <template_version>") -def get_stations_in_group(request, station_group:str, template_name:str, template_version:str): +def get_stations_in_group(request, template_name:str, template_version:str, station_group:str): station_schema_template = get_object_or_404(models.CommonSchemaTemplate, name=template_name, version=template_version) station_schema = station_schema_template.schema diff --git a/SAS/TMSS/src/tmss/urls.py b/SAS/TMSS/src/tmss/urls.py index 9a7f968efb8..e08487354f6 100644 --- a/SAS/TMSS/src/tmss/urls.py +++ b/SAS/TMSS/src/tmss/urls.py @@ -64,8 +64,8 @@ urlpatterns = [ path('redoc/', swagger_schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'), path('schemas/<str:template>/<str:name>/<str:version>', views.get_template_json_schema, name='get_template_json_schema'), #TODO: how to make trailing slash optional? path('schemas/<str:template>/<str:name>/<str:version>/', views.get_template_json_schema, name='get_template_json_schema'), - path('station_groups/<str:station_group>/<str:template_name>/<str:template_version>', views.get_stations_in_group, name='get_stations_in_group'), #TODO: how to make trailing slash optional? - path('station_groups/<str:station_group>/<str:template_name>/<str:template_version>/', views.get_stations_in_group, name='get_stations_in_group'), + path('station_groups/<str:template_name>/<str:template_version>/<str:station_group>', views.get_stations_in_group, name='get_stations_in_group'), #TODO: how to make trailing slash optional? + path('station_groups/<str:template_name>/<str:template_version>/<str:station_group>/', views.get_stations_in_group, name='get_stations_in_group'), path(r'util/utc', views.utc, name="system-utc"), path(r'util/lst', views.lst, name="conversion-lst"), path('__debug__/', include(debug_toolbar.urls)), -- GitLab