From 413309b46cf58d9e29ff32bb24ae8624f57e2fa7 Mon Sep 17 00:00:00 2001 From: Aadesh-Baral Date: Wed, 27 Jul 2022 13:49:31 +0545 Subject: [PATCH] Revert "Allow to clear field" This reverts commit a50a963061a3086420463e133c2a1fc5a6ac61dd. --- backend/models/postgis/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/models/postgis/user.py b/backend/models/postgis/user.py index a284653ac7..fb75ae9d46 100644 --- a/backend/models/postgis/user.py +++ b/backend/models/postgis/user.py @@ -109,7 +109,7 @@ def update(self, user_dto: UserDTO): try: is_field_nullable = self.__table__.columns[attr].nullable - if is_field_nullable: + if is_field_nullable and value is not None: setattr(self, attr, value) elif value is not None: setattr(self, attr, value)