mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-27 02:43:01 +00:00
Provide also note information (with balance and picture)
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
40e1b42078
commit
73d27e820b
@ -8,6 +8,7 @@ from django.utils import timezone
|
|||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
from member.api.serializers import ProfileSerializer, MembershipSerializer
|
from member.api.serializers import ProfileSerializer, MembershipSerializer
|
||||||
|
from note.api.serializers import NoteSerializer
|
||||||
from note.models import Alias
|
from note.models import Alias
|
||||||
|
|
||||||
|
|
||||||
@ -47,6 +48,8 @@ class OAuthSerializer(serializers.ModelSerializer):
|
|||||||
|
|
||||||
profile = ProfileSerializer()
|
profile = ProfileSerializer()
|
||||||
|
|
||||||
|
note = NoteSerializer()
|
||||||
|
|
||||||
memberships = serializers.SerializerMethodField()
|
memberships = serializers.SerializerMethodField()
|
||||||
|
|
||||||
def get_normalized_name(self, obj):
|
def get_normalized_name(self, obj):
|
||||||
@ -69,5 +72,6 @@ class OAuthSerializer(serializers.ModelSerializer):
|
|||||||
'is_active',
|
'is_active',
|
||||||
'is_staff',
|
'is_staff',
|
||||||
'profile',
|
'profile',
|
||||||
|
'note',
|
||||||
'memberships',
|
'memberships',
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user