Skip to content
Snippets Groups Projects
Commit a231e96f authored by Jean-Philippe Laverdure's avatar Jean-Philippe Laverdure
Browse files

changes url signature to use slug

parent e9966457
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ urlpatterns = [
path('secure/dataset/<slug:iric_data_id>', DataSetInitDetailsView.as_view(), name='user.dataset-details-view-iric-data-id'),
path('secure/dataset/download/<int:pk>', DataSetDownload.as_view(), name='user.dataset-download'),
path('secure/dataset/download/<slug:iric_data_id>', DataSetDownload.as_view(), name='user.dataset-download-iric-data-id'),
path('secure/user/<str:sim>/datasets', DataSetFileListJSONView.as_view(), name='admin.user-dataset-json-list'),
path('secure/user/<slug:sim>/datasets', DataSetFileListJSONView.as_view(), name='admin.user-dataset-json-list'),
# ShareGroups
path('secure/sharegroups/list/json/', ShareGroupJSONListView.as_view(), name='secure.sharegroup-json-list'),
......
......@@ -311,7 +311,7 @@ class DataSetFileListJSONView(StaffViewMixin, JSONView):
slug_field = 'iric_data_id'
def get_queryset(self):
profile = Profile.objects.filter(accountname=self.kwargs.get('sim'))
profile = Profile.objects.filter(accountname=self.kwargs.get('slug'))
return super().get_queryset().filter(
Q(created_by=profile)
| Q(share_profiles=profile)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment