We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6927710 commit 86051e8Copy full SHA for 86051e8
django_features/custom_fields/serializers.py
@@ -145,7 +145,8 @@ def _create_or_update_custom_value(
145
) -> None:
146
serializer_field = field.serializer_field
147
serializer_field.run_validators(value)
148
- value = serializer_field.to_representation(value)
+ if value is not None:
149
+ value = serializer_field.to_representation(value)
150
try:
151
value_object = instance.custom_values.select_related("field").get(
152
field_id=field.id
0 commit comments