mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
(improvement)(Headless) Check subDomain when deleting a domain (#852)
Co-authored-by: jolunoluo
This commit is contained in:
@@ -77,6 +77,12 @@ public class DomainServiceImpl implements DomainService {
|
||||
if (!CollectionUtils.isEmpty(modelResps)) {
|
||||
throw new RuntimeException("该主题域下还存在模型, 暂不能删除, 请确认");
|
||||
}
|
||||
List<DomainResp> domainList = getDomainList();
|
||||
for (DomainResp domainResp : domainList) {
|
||||
if (id.equals(domainResp.getParentId())) {
|
||||
throw new RuntimeException("该主题域下还存在子主题域, 暂不能删除, 请确认");
|
||||
}
|
||||
}
|
||||
domainRepository.deleteDomain(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user