Commit 77b958dd authored by Liang Ding's avatar Liang Ding
Browse files

🚧 #12256

parent e9a261fb
Showing with 4 additions and 0 deletions
+4 -0
......@@ -205,6 +205,10 @@ public class CategoryMgmtService {
@Transactional
public void updateCategory(final String categoryId, final JSONObject category) throws ServiceException {
try {
final JSONObject oldCategory = categoryRepository.get(categoryId);
category.put(Category.CATEGORY_ORDER, oldCategory.optInt(Category.CATEGORY_ORDER));
category.put(Category.CATEGORY_TAG_CNT, oldCategory.optInt(Category.CATEGORY_TAG_CNT));
categoryRepository.update(categoryId, category);
} catch (final RepositoryException e) {
LOGGER.log(Level.ERROR, "Updates a category [id=" + categoryId + "] failed", e);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment