Exemplo n.º 1
0
 def to_internal_value(self, data):
     """Resolve the version only by `id`."""
     # Version queryset is unfiltered, the version is checked more
     # thoroughly in `RatingSerializer.validate()` method.
     field = PrimaryKeyRelatedField(queryset=Version.unfiltered)
     value = field.to_internal_value(data)
     return OrderedDict([('id', data), ('version', value)])
Exemplo n.º 2
0
 def to_internal_value(self, data):
     """Resolve the version only by `id`."""
     # Version queryset is unfiltered, the version is checked more
     # thoroughly in `RatingSerializer.validate()` method.
     field = PrimaryKeyRelatedField(queryset=Version.unfiltered)
     value = field.to_internal_value(data)
     return OrderedDict([('id', data), ('version', value)])
Exemplo n.º 3
0
 def to_internal_value(self, data):
     """Resolve the version only by `id`."""
     # Version queryset is unfiltered, the version is checked more
     # thoroughly in `ReviewSerializer.validate()` method.
     field = PrimaryKeyRelatedField(queryset=Version.unfiltered)
     return field.to_internal_value(data)
Exemplo n.º 4
0
 def to_internal_value(self, data):
     """Resolve the version only by `id`."""
     # Version queryset is unfiltered, the version is checked more
     # thoroughly in `ReviewSerializer.validate()` method.
     field = PrimaryKeyRelatedField(queryset=Version.unfiltered)
     return field.to_internal_value(data)