fix broker bug in organization -> organization type
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from rest_framework import serializers
|
||||
from apps.product import models as product_models
|
||||
from apps.authorization.api.v1 import serializers as authorize_serializers
|
||||
from apps.authentication.api.v1.serializers.serializer import OrganizationSerializer
|
||||
from apps.authentication.api.v1.serializers.serializer import OrganizationSerializer, OrganizationTypeSerializer
|
||||
|
||||
|
||||
class ProductCategorySerializer(serializers.ModelSerializer):
|
||||
@@ -111,7 +111,7 @@ class BrokerSerializer(serializers.ModelSerializer):
|
||||
def to_representation(self, instance):
|
||||
representation = super().to_representation(instance)
|
||||
if instance.organization_type:
|
||||
representation['organization_type'] = OrganizationSerializer(
|
||||
representation['organization_type'] = OrganizationTypeSerializer(
|
||||
instance.organization_type
|
||||
).data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user