You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I send the data as a form-data, one-to-one relationships are lost and set to null
But when I make a request in the form of json, it is applied correctly, the request must be sent in the form of a form-data
Does anyone know what the problem is?
The text was updated successfully, but these errors were encountered:
my code:
class UserSerializer(NestedUpdateMixin, serializers.ModelSerializer):
skill = SkillSerializer(many=True, required=False)
experience = ExperienceSerializer(many=True, required=False)
education = EducationSerializer(many=True, required=False)
profile = ProfileSerializer(required=True, instance=Profile)
class ProfileSerializer(WritableNestedModelSerializer):
child = ChildSerializer(many=True, required=False)
foreigner = UserForeignerSerializer(required=False, allow_null=True, instance=UserForeigner)
When I send the data as a form-data, one-to-one relationships are lost and set to null
But when I make a request in the form of json, it is applied correctly, the request must be sent in the form of a form-data
Does anyone know what the problem is?
The text was updated successfully, but these errors were encountered: