fix: system/view
This commit is contained in:
parent
ae4d6aa0d3
commit
cd0837970c
|
@ -348,7 +348,7 @@ class UserExamViewset(ImpMixin, ModelViewSet):
|
||||||
for row in sheet.iter_rows(min_row=start, values_only=True): # 假设第一行是表头,从第二行开始读取数据
|
for row in sheet.iter_rows(min_row=start, values_only=True): # 假设第一行是表头,从第二行开始读取数据
|
||||||
if row[0] is not None:
|
if row[0] is not None:
|
||||||
dept = Organization.objects.get(name=row[2])
|
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)
|
serializer = OrganizationSerializer(user_depts, many=True)
|
||||||
depts = any(i.id==dept.id for i in serializer.data)
|
depts = any(i.id==dept.id for i in serializer.data)
|
||||||
if depts is False:
|
if depts is False:
|
||||||
|
|
Loading…
Reference in New Issue