From 445b3f393eb14a2264ee1fd3e6d28f236bb2abc8 Mon Sep 17 00:00:00 2001 From: Nguyen Son <152074875+thson58@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:08:31 +0700 Subject: [PATCH] fix ghi chu --- .../controller/management/product/UpdateProductServlet.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/io/hardingadonis/saledock/controller/management/product/UpdateProductServlet.java b/src/main/java/io/hardingadonis/saledock/controller/management/product/UpdateProductServlet.java index cf954ea..f4a3121 100644 --- a/src/main/java/io/hardingadonis/saledock/controller/management/product/UpdateProductServlet.java +++ b/src/main/java/io/hardingadonis/saledock/controller/management/product/UpdateProductServlet.java @@ -102,6 +102,11 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) product.setDescription(productDescription); } + if (productDescription.trim().length() > 0) { + product.setDescription(productDescription); + + } + Singleton.productDAO.save(product); response.sendRedirect("./product-detail?id=" + idP);