From a0763f6da8fbe4ea9e5a1879a5e49bd08d6d04a3 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 18 Sep 2019 09:22:59 +1200 Subject: [PATCH] API: fix recipes view to really point to recipes ViewSet I forgot the lesson of f5922091b4c8b888849df158548453b73f92a377 which was that djangorestframework has a very silly default of registering the model name as the key for finding the ViewSet, with the result that the recently created RecipesExtendedViewSet was also being used for the recipes URL which we expect to point to RecipeViewSet; this broke the bitbake-layers layerindex-* commands. Signed-off-by: Paul Eggleton --- layerindex/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layerindex/urls.py b/layerindex/urls.py index 13f42c9..7f4e545 100644 --- a/layerindex/urls.py +++ b/layerindex/urls.py @@ -28,7 +28,7 @@ router.register(r'layerDependencies', restviews.LayerDependencyViewSet) router.register(r'layerMaintainers', restviews.LayerMaintainerViewSet) router.register(r'layerNotes', restviews.LayerNoteViewSet) router.register(r'recipes', restviews.RecipeViewSet) -router.register(r'recipesExtended', restviews.RecipeExtendedViewSet) +router.register(r'recipesExtended', restviews.RecipeExtendedViewSet, 'recipesExtended') router.register(r'machines', restviews.MachineViewSet) router.register(r'distros', restviews.DistroViewSet) router.register(r'classes', restviews.ClassViewSet)