Пример #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)])
Пример #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)])
Пример #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)
Пример #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)