keon94 commented on code in PR #5506:
URL: 
https://github.com/apache/incubator-devlake/pull/5506#discussion_r1232318516


##########
backend/helpers/pluginhelper/api/scope_generic_helper.go:
##########
@@ -288,43 +290,49 @@ func (gs *GenericScopeApiHelper[Conn, Scope, Tr]) 
GetScope(input *plugin.ApiReso
        return scopeRes, nil
 }
 
-func (gs *GenericScopeApiHelper[Conn, Scope, Tr]) DeleteScope(input 
*plugin.ApiResourceInput) errors.Error {
+func (gs *GenericScopeApiHelper[Conn, Scope, Tr]) DeleteScope(input 
*plugin.ApiResourceInput) (*serviceHelper.BlueprintProjectPairs, errors.Error) {
        params, err := gs.extractFromDeleteReqParam(input)
        if err != nil {
-               return err
+               return nil, err
        }
        err = gs.dbHelper.VerifyConnection(params.connectionId)
        if err != nil {
-               return errors.Default.Wrap(err, fmt.Sprintf("error verifying 
connection for connection ID %d", params.connectionId))
+               return nil, errors.Default.Wrap(err, fmt.Sprintf("error 
verifying connection for connection ID %d", params.connectionId))
+       }
+       if refs, err := gs.getScopeReferences(input.GetPlugin(), 
params.connectionId, params.scopeId); err != nil || refs != nil {

Review Comment:
   But disallowing that is part of the ticket's requirements (cc @Startrekzky):
   
https://github.com/apache/incubator-devlake/issues/5503#issuecomment-1593356778
   
![image](https://github.com/apache/incubator-devlake/assets/25063936/e13149a5-940e-449a-8229-1f0dc4bf9129)
   
   Do you mean force the option via a flag?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to