diff --git a/sapl/api/views.py b/sapl/api/views.py index ceff4ccd7..a8f6f3349 100644 --- a/sapl/api/views.py +++ b/sapl/api/views.py @@ -400,6 +400,11 @@ class _MateriaLegislativaViewSet: return Response(serializer_class.data) + @action(detail=True, methods=['GET']) + def anexadas(self, request, *args, **kwargs): + self.queryset = self.get_object().anexadas.all() + return self.list(request, *args, **kwargs) + @customize(TipoMateriaLegislativa) class _TipoMateriaLegislativaViewSet: