Skip to content

Commit

Permalink
Clean up: Get OrganizationSerializer class from viewset utility fn
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankApiyo committed Aug 19, 2024
1 parent 1a99111 commit 332b9c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion onadata/apps/api/viewsets/organization_profile_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions onadata/libs/utils/cache_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from django.core.cache import cache
from django.utils.encoding import force_bytes

from onadata.libs.permissions import ROLES_ORDERED

# Cache names used in project serializer
PROJ_PERM_CACHE = "ps-project_permissions-"
PROJ_NUM_DATASET_CACHE = "ps-num_datasets-"
Expand Down

0 comments on commit 332b9c0

Please sign in to comment.