|
@@ -19,7 +19,7 @@ class SchoolDeptViews(APIView):
|
|
|
resData = SchoolDept.objects.filter(parent_id=parentId).annotate(childer=F('rght') - F('lft') - 1).values('id',
|
|
|
'name',
|
|
|
'remark',
|
|
|
- 'childer').all()
|
|
|
+ 'childer','parent_id').all()
|
|
|
for res in resData:
|
|
|
res['childer'] = res['childer'] // 2 != 0
|
|
|
return Response(data=resData, status=status.HTTP_200_OK)
|