application api queryset
This commit is contained in:
parent
8890777237
commit
c34c449de3
2 changed files with 4 additions and 3 deletions
|
|
@ -7,6 +7,7 @@ class ApplicationSerializer(serializers.ModelSerializer):
|
|||
model = Application
|
||||
fields = ('uuid',
|
||||
'name',
|
||||
'avatar',
|
||||
'client_id',
|
||||
'user',
|
||||
'allowed_scope',
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ class ApplicationViewSet(ReadOnlyModelViewSet):
|
|||
required_alternate_scopes = {
|
||||
"GET": [['accounts.applications:list_or_retrieve']],
|
||||
}
|
||||
def get_queryset(self):
|
||||
user = self.request.user
|
||||
return Application.objects.filter(user=user).all()
|
||||
# def get_queryset(self):
|
||||
# user = self.request.user
|
||||
# return Application.objects.filter(user=user).all()
|
||||
|
||||
@action(detail=True, permission_classes=[AllowAny])
|
||||
def avatar(self, request, pk=None):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue