You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2022/10/21 17:03:44 UTC

[GitHub] [incubator-streampark] 1996fanrui commented on a diff in pull request #1881: [Feature] Check apps and projects before delete team

1996fanrui commented on code in PR #1881:
URL: https://github.com/apache/incubator-streampark/pull/1881#discussion_r1002010080


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/service/impl/TeamServiceImpl.java:
##########
@@ -74,9 +94,21 @@ public void createTeam(Team team) {
     }
 
     @Override
-    public void deleteTeam(Team team) {
-        // TODO 查询 app 和 project,如果还有 app 或 project 没有删除,则 team 不能被删除。
-        this.removeById(team);
+    public void deleteTeam(Long teamId) {
+        log.info("{} Proceed delete team[Id={}]", commonService.getCurrentUser().getUsername(), teamId);
+        Team team = this.getById(teamId);
+        if (team == null) {
+            log.info("The team[Id={}] doesn't exists.", teamId);

Review Comment:
   Thanks for your review, updated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org