-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Description
At this line function parse_html_dict
allow to parse dictionaries with primitive values like:
{
'profile.username': 'example',
'profile.email': 'example@example.com',
}
-->
{
'profile': {
'username': 'example',
'email': 'example@example.com'
}
}
But if value is an array parser does not work properly:
{
'profile.username': 'example',
'profile.email': 'example@example.com',
'profile.group': ['1', '2'],
}
Problem that QueryDict on the line:
for field, value in dictionary.items():
dictionary.items()
returns last item from list ['1', '2'] as a value
.
I have the following Serializer:
class ProfileSerializer(serializers.ModelSerializer):
class Meta:
model = Profile
class UserSerializer(serializers.ModelSerializer):
profile = ProfileSerializer(required=False)
and group
is a ManyToMany
field in Profile
model.
Metadata
Metadata
Assignees
Labels
No labels