import - add org ownership_code on profile

This commit is contained in:
2026-01-07 15:39:53 +03:30
parent 8fb3bf5dc9
commit c47c8054e4

View File

@@ -156,7 +156,11 @@ class UserRelationSerializer(serializers.ModelSerializer):
if instance.user:
representation['user'] = auth_serializer.UserSerializer(instance.user).data
if instance.organization:
representation['organization'] = {"id": instance.organization.id, "name": instance.organization.name}
representation['organization'] = {
"id": instance.organization.id,
"name": instance.organization.name,
"ownership_code": instance.organization.ownership_code
}
if instance.role:
representation['role'] = {
"id": instance.role.id, "role_name": instance.role.role_name, 'type': {