fix: system/view

This commit is contained in:
zty 2024-06-14 16:43:57 +08:00
parent ae4d6aa0d3
commit cd0837970c
1 changed files with 1 additions and 1 deletions

View File

@ -348,7 +348,7 @@ class UserExamViewset(ImpMixin, ModelViewSet):
for row in sheet.iter_rows(min_row=start, values_only=True): # 假设第一行是表头,从第二行开始读取数据
if row[0] is not None:
dept = Organization.objects.get(name=row[2])
user_depts = get_child_queryset2(request.user.dept).order_by('sort')
user_depts = get_child_queryset2(self.request.user.dept).order_by('sort')
serializer = OrganizationSerializer(user_depts, many=True)
depts = any(i.id==dept.id for i in serializer.data)
if depts is False: