Skip to content

Commit 9287fc2

Browse files
committed
tabedit: Save empty inputs as NULL
1 parent 4e8c464 commit 9287fc2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/gws/ext/action/tabedit/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ def api_save_data(self, req: t.IRequest, p: SaveDataParams) -> SaveDataResponse:
160160
uid = None
161161

162162
for a, v in zip(p.attributes, rec):
163-
if v is None or v == '':
164-
continue
163+
# Normalize empty inputs to insert NULL into the database.
164+
if v == '':
165+
v = None
165166
atts.append(t.Attribute(name=a.name, value=v))
166167
if a.name == tbl.table.key_column:
167168
uid = v

0 commit comments

Comments
 (0)