From a1ea1c6566b45b0418a4e28256e3224fb6305194 Mon Sep 17 00:00:00 2001 From: through-your-tears Date: Sun, 7 Apr 2024 10:26:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B0=D0=B3=20=D1=84=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/organizations/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/organizations/serializers.py b/src/organizations/serializers.py index 9ae53b0..635f2ed 100644 --- a/src/organizations/serializers.py +++ b/src/organizations/serializers.py @@ -33,7 +33,8 @@ class OrganizationListSerializer(serializers.ModelSerializer): class OrganizationCreateSerializer(serializers.ModelSerializer): location = LocationSerializer() - images = serializers.PrimaryKeyRelatedField(source='organization_images', many=True, queryset=OrganizationImagesRepository) + images = serializers.PrimaryKeyRelatedField(source='organization_images', many=True, + queryset=OrganizationImagesRepository.all(), required=False) owner = serializers.StringRelatedField() category = serializers.PrimaryKeyRelatedField(queryset=CategoryRepository.all())