1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-23 07:52:23 +00:00

Provide also note information (with balance and picture)

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-03-09 12:55:19 +01:00
parent 40e1b42078
commit 73d27e820b
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -8,6 +8,7 @@ from django.utils import timezone
from rest_framework import serializers
from member.api.serializers import ProfileSerializer, MembershipSerializer
from note.api.serializers import NoteSerializer
from note.models import Alias
@ -47,6 +48,8 @@ class OAuthSerializer(serializers.ModelSerializer):
profile = ProfileSerializer()
note = NoteSerializer()
memberships = serializers.SerializerMethodField()
def get_normalized_name(self, obj):
@ -69,5 +72,6 @@ class OAuthSerializer(serializers.ModelSerializer):
'is_active',
'is_staff',
'profile',
'note',
'memberships',
)