Showing
1 changed file
with
2 additions
and
0 deletions
@@ -42,6 +42,8 @@ class EdictoSerializer(serializers.ModelSerializer): | @@ -42,6 +42,8 @@ class EdictoSerializer(serializers.ModelSerializer): | ||
42 | data = super().to_representation(instance) | 42 | data = super().to_representation(instance) |
43 | if instance.fecha_modificacion is not None and self.context['request'].method == 'PATCH': | 43 | if instance.fecha_modificacion is not None and self.context['request'].method == 'PATCH': |
44 | data['fecha_modificacion'] = instance.fecha_modificacion | 44 | data['fecha_modificacion'] = instance.fecha_modificacion |
45 | + else: | ||
46 | + data['fecha_modificacion'] = None | ||
45 | return data | 47 | return data |
46 | 48 | ||
47 | @staticmethod | 49 | @staticmethod |
-
Please register or login to post a comment