From ba44d716eee82792df3e7062d68515e702647626 Mon Sep 17 00:00:00 2001 From: FrankApiyo Date: Mon, 19 Aug 2024 19:33:45 +0300 Subject: [PATCH] Clean up: Get OrganizationSerializer class from viewset utility fn --- onadata/apps/api/viewsets/organization_profile_viewset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onadata/apps/api/viewsets/organization_profile_viewset.py b/onadata/apps/api/viewsets/organization_profile_viewset.py index 0c89d2ca4b..9f035b9d0a 100644 --- a/onadata/apps/api/viewsets/organization_profile_viewset.py +++ b/onadata/apps/api/viewsets/organization_profile_viewset.py @@ -130,7 +130,7 @@ def members(self, request, *args, **kwargs): serializer.save() - data = OrganizationSerializer( + data = self.serializer_class( organization, context={"request": request} ).data # pylint: disable=attribute-defined-outside-init