Skip to content

Commit

Permalink
Allow to clear field
Browse files Browse the repository at this point in the history
  • Loading branch information
Aadesh-Baral committed Jul 25, 2022
1 parent ae4dc79 commit a50a963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/models/postgis/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def update(self, user_dto: UserDTO):

try:
is_field_nullable = self.__table__.columns[attr].nullable
if is_field_nullable and value is not None:
if is_field_nullable:
setattr(self, attr, value)
elif value is not None:
setattr(self, attr, value)
Expand Down

0 comments on commit a50a963

Please sign in to comment.