Skip to content

Commit

Permalink
Merge branch 'develop' into feature/billing
Browse files Browse the repository at this point in the history
  • Loading branch information
dyohan9 committed Aug 6, 2021
2 parents 498168d + f6d94ac commit cc408b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion weni/api/v1/account/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def change_language(self, request, **kwargs): # pragma: no cover
],
)

return Response()
return Response({"language": user.language})


class SearchUserViewSet(mixins.ListModelMixin, GenericViewSet): # pragma: no cover
Expand Down
6 changes: 4 additions & 2 deletions weni/api/v1/organization/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import mixins
from rest_framework.decorators import action
from rest_framework.filters import SearchFilter
from rest_framework.filters import SearchFilter, OrderingFilter
from rest_framework.generics import get_object_or_404
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
Expand Down Expand Up @@ -100,7 +100,7 @@ class OrganizationAuthorizationViewSet(
serializer_class = OrganizationAuthorizationSerializer
filter_class = OrganizationAuthorizationFilter
lookup_fields = ["organization__uuid", "user__id"]
filter_backends = [DjangoFilterBackend, SearchFilter]
filter_backends = [DjangoFilterBackend, SearchFilter, OrderingFilter]
search_fields = [
"=user__first_name",
"^user__first_name",
Expand All @@ -115,6 +115,8 @@ class OrganizationAuthorizationViewSet(
"^user__email",
"$user__email",
]
ordering = ["-user__first_name"]

permission_classes = [IsAuthenticated]

def get_object(self):
Expand Down

0 comments on commit cc408b3

Please sign in to comment.