Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu327 committed Nov 24, 2023
1 parent 1d3152e commit a89a1a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion saas/backend/apps/subject_template/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from functools import wraps
from typing import List

from django.shortcuts import get_object_or_404
from django.utils.translation import gettext as _
from drf_yasg.utils import swagger_auto_schema
from pydantic import parse_obj_as
Expand Down Expand Up @@ -374,7 +375,7 @@ class SubjectTemplateGroupViewSet(SubjectTemplateQueryMixin, GenericViewSet):
tags=["subject-template"],
)
def list(self, request, *args, **kwargs):
template = self.get_object()
template = get_object_or_404(self.queryset, pk=kwargs["id"])

subject_template_groups = list(
SubjectTemplateGroup.objects.filter(template_id=template.id).values(
Expand Down

0 comments on commit a89a1a9

Please sign in to comment.