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): def to_representation(self, instance):
representation = super().to_representation(instance) representation = super().to_representation(instance)
if instance.organization: if instance.organization_type:
representation['organization'] = OrganizationSerializer( representation['organization_type'] = OrganizationSerializer(
instance.organization instance.organization_type
).data ).data
if instance.product: if instance.product: