Django, чтобы изменить значение в теле и вернуть его
#python #django #django-models #django-rest-framework #django-views Вопрос: class LocationRetrieveSerializer(serializers.ModelSerializer): class Meta: model = UserAttributes fields = '__all__' def create(self, validated_data): logger.info(self.context["request"].user.aerosimple_user) if UserAttributes.objects.filter(user_id=self.context["request"].data['user']).exists(): raise serializers.ValidationError("User Already exists.") user_attributes = UserAttributes.objects.create(**validated_data) return…