diff --git a/program/views.py b/program/views.py index 8d151b575e6cde9e221ccc8f7699b9d100ed27e6..c970cbc4c11be93d0aef298f6d1c6bd3371c79b1 100644 --- a/program/views.py +++ b/program/views.py @@ -1049,17 +1049,20 @@ class APITimeSlotViewSet( @extend_schema_view( - create=extend_schema(summary="Create a new note."), - retrieve=extend_schema(summary="Retrieve a single note."), - update=extend_schema(summary="Update an existing note."), + list=extend_schema(summary="List all notes."), partial_update=extend_schema( summary="Partially update an existing note.", description="Only admins can partially update existing notes.", ), - destroy=extend_schema(summary="Delete an existing note."), - list=extend_schema(summary="List all notes."), + retrieve=extend_schema(summary="Retrieve a single note."), + update=extend_schema(summary="Update an existing note."), ) -class APINoteViewSet(viewsets.ModelViewSet): +class APINoteViewSet( + mixins.ListModelMixin, + mixins.RetrieveModelMixin, + mixins.UpdateModelMixin, + viewsets.GenericViewSet, +): filterset_class = filters.NoteFilterSet pagination_class = LimitOffsetPagination serializer_class = NoteSerializer