# Update serializer: do not update missing values to null

**URL:** <https://forum.djangoproject.com/t/update-serializer-do-not-update-missing-values-to-null/29012>\
**Category:** Forms & APIs\
**Created:** [March 13, 2024, 12:34am UTC](https://forum.djangoproject.com/t/update-serializer-do-not-update-missing-values-to-null/29012 "2024-03-13T00:34:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkHarrisCanterbury](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/markharriscanterbury/32/24426_2.png) [@MarkHarrisCanterbury](https://forum.djangoproject.com/u/MarkHarrisCanterbury)\
**Post date:** [March 13, 2024, 12:34am UTC](https://forum.djangoproject.com/t/update-serializer-do-not-update-missing-values-to-null/29012/1 "2024-03-13T00:34:14Z")

</div>

Hello,

N00b here, so apologies if this is a trivial question, but I couldn’t find anything obvious concerning my question in a search.

I have a serializer used as part of an update via a PATCH call.

If a field in the serializer has no value, the associated field in the database is set to NULL when the update is performed. It’s defined like this:

```
from rest_framework import serializers

class MySerializer(serializers.ModelSerializer):
    address_1 = serializers.CharField(required=False, allow_null=True, allow_blank=True)

```

Is there any way to alter this behaviour in Django? As in: if no value is supplied, then the value in the database is unchanged. Only fields with values are updated.

Thank you in advance for any assistance.
