Skip to content

Commit

Permalink
Feat add department search (#2175)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu327 authored Aug 8, 2023
1 parent 4b5f7af commit f8170b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions saas/backend/apps/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,8 @@ def search(self, request, *args, **kwargs):
if page is not None:
group_dict = {one.id: one for one in groups}
relations = [group_dict[one.id] for one in page]
results = self.biz._convert_to_subject_group_beans(relations)

slz = GroupSLZ(instance=results, many=True)
slz = GroupSLZ(instance=relations, many=True)
return Response({"count": queryset.count(), "results": slz.data})

return Response({"count": 0, "results": []})

0 comments on commit f8170b7

Please sign in to comment.