I'm perplexed and can't figure out what I'm missing. I've stripped a
ModelSerializer down to just the PK (a UUID) and am trying to create a
serialized object through the data= kwarg. I then call is_valid() which
returns true, but the validated_data is empty. what am I doing wrong?
```
class GroupSerializer(serializers.ModelSerializer):
class Meta:
model = Group
fields = [
'id',
]
In [*17*]: data = {'id': 'fffd128a-8fc0-4487-b297-f952c38c1d09'}
...: serialized = GroupSerializer(data=data)
...:
In [*18*]: serialized.initial_data
Out[*18*]: {'id': 'fffd128a-8fc0-4487-b297-f952c38c1d09'}
In [*19*]: serialized.is_valid()
Out[*19*]: True
In [*20*]: serialized.validated_data
Out[*20*]: OrderedDict()
```
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-rest-framework/7b9fa6d5-09d2-4a9e-81c2-b782ae809f85%40googlegroups.com.