API: fix recipes view to really point to recipes ViewSet

I forgot the lesson of f5922091b4 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 <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2019-09-18 09:22:59 +12:00
parent b78e498c20
commit a0763f6da8

View File

@ -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)