Skip to content

Commit f20532f

Browse files
allow setting description to null or empty
1 parent 33caec4 commit f20532f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/migrated_routes/product.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ def put(self, data, id):
220220

221221
if name := data.get("name"):
222222
product.name = name
223-
if description := data.get("description"):
224-
product.description = description
223+
if "description" in data:
224+
product.description = data["description"]
225225

226226
with db.session.no_autoflush:
227227
if sc_ids := data.get("subcategories"):

0 commit comments

Comments
 (0)