fix: correct queryset filtering for dept scope

This commit is contained in:
caoqianming 2026-03-19 21:46:08 +08:00
parent 27ae86462a
commit 076eb4fc98
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ class CustomGenericViewSet(MyLoggingMixin, GenericViewSet):
"""
if hasattr(queryset.model, 'belong_dept'):
whereis = {self.data_filter_field: dept}
queryset = queryset.filter(whereis)
queryset = queryset.filter(**whereis)
return queryset
return queryset.filter(create_by=self.request.user)