fix broker bug in organization -> organization type

This commit is contained in:
2025-08-05 16:52:52 +03:30
parent fdd9a5af4a
commit 445ea153c8

View File

@@ -110,9 +110,9 @@ class BrokerSerializer(serializers.ModelSerializer):
def to_representation(self, instance):
representation = super().to_representation(instance)
if instance.organization:
representation['organization'] = OrganizationSerializer(
instance.organization
if instance.organization_type:
representation['organization_type'] = OrganizationSerializer(
instance.organization_type
).data
if instance.product: