feat: mlog get_queryset bug

This commit is contained in:
caoqianming 2025-03-25 15:40:53 +08:00
parent 546b020dae
commit 8bf3ad06d6
1 changed files with 2 additions and 3 deletions

View File

@ -787,9 +787,8 @@ class MlogUserViewSet(BulkCreateModelMixin, ListModelMixin, DestroyModelMixin, C
def get_queryset(self):
qs = super().get_queryset()
mlog = self.request.query_params.get("mlog", None)
if not mlog:
return qs.none()
if self.request.method == "GET":
qs = qs.filter(mlog__id=self.request.query_params.get("mlog", None))
return qs
def perform_destroy(self, instance):