mirror of
https://git.victorphan.net/basketballcantho/Teedy_custom.git
synced 2026-08-05 22:03:11 +07:00
#23: Edit tag parent
This commit is contained in:
@@ -121,7 +121,9 @@ public class TagResource extends BaseResource {
|
||||
}
|
||||
|
||||
// Check the parent
|
||||
if (parentId != null) {
|
||||
if (StringUtils.isEmpty(parentId)) {
|
||||
parentId = null;
|
||||
} else {
|
||||
Tag parentTag = tagDao.getByTagId(principal.getId(), parentId);
|
||||
if (parentTag == null) {
|
||||
throw new ClientException("ParentNotFound", MessageFormat.format("Parent not found: {0}", parentId));
|
||||
@@ -175,7 +177,9 @@ public class TagResource extends BaseResource {
|
||||
}
|
||||
|
||||
// Check the parent
|
||||
if (parentId != null) {
|
||||
if (StringUtils.isEmpty(parentId)) {
|
||||
parentId = null;
|
||||
} else {
|
||||
Tag parentTag = tagDao.getByTagId(principal.getId(), parentId);
|
||||
if (parentTag == null) {
|
||||
throw new ClientException("ParentNotFound", MessageFormat.format("Parent not found: {0}", parentId));
|
||||
|
||||
Reference in New Issue
Block a user