import - add org ownership_code on profile
This commit is contained in:
@@ -156,7 +156,11 @@ class UserRelationSerializer(serializers.ModelSerializer):
|
|||||||
if instance.user:
|
if instance.user:
|
||||||
representation['user'] = auth_serializer.UserSerializer(instance.user).data
|
representation['user'] = auth_serializer.UserSerializer(instance.user).data
|
||||||
if instance.organization:
|
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:
|
if instance.role:
|
||||||
representation['role'] = {
|
representation['role'] = {
|
||||||
"id": instance.role.id, "role_name": instance.role.role_name, 'type': {
|
"id": instance.role.id, "role_name": instance.role.role_name, 'type': {
|
||||||
|
|||||||
Reference in New Issue
Block a user