Add tenant filtering to LighthouseConfig queries

Co-authored-by: Víctor Fernández Poyatos <vicferpoy@gmail.com>
This commit is contained in:
Chandrapal Badshah
2025-04-29 19:56:32 +05:30
committed by Chandrapal Badshah
parent c459cde1ff
commit 1d9a05fa2f
+1 -1
View File
@@ -2797,7 +2797,7 @@ class LighthouseConfigViewSet(BaseRLSViewSet):
ordering = ["-inserted_at"]
def get_queryset(self):
return LighthouseConfig.objects.all()
return LighthouseConfig.objects.filter(tenant_id=self.request.tenant_id)
def get_serializer_class(self):
if self.action == "create":