예제 #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
파일: serializers.py 프로젝트: diox/olympia
 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)