weizhouapache commented on code in PR #12151:
URL: https://github.com/apache/cloudstack/pull/12151#discussion_r2568411200


##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -2359,12 +2359,15 @@ else if (details != null && !details.isEmpty()) {
 
     @Override
     public TemplateType validateTemplateType(BaseCmd cmd, boolean isAdmin, 
boolean isCrossZones, HypervisorType hypervisorType) {
-        if (!(cmd instanceof UpdateTemplateCmd) && !(cmd instanceof 
RegisterTemplateCmd) && !(cmd instanceof GetUploadParamsForTemplateCmd)) {
+        if (!(cmd instanceof UpdateTemplateCmd) &&
+                !(cmd instanceof RegisterTemplateCmd) &&
+                !(cmd instanceof GetUploadParamsForTemplateCmd) &&
+                !(cmd instanceof GetUploadParamsForIsoCmd)) {
             return null;
         }
         TemplateType templateType = null;

Review Comment:
   can we just use
   ```
   if (cmd instanceof GetUploadParamsForIsoCmd) {
       return TemplateType.USER;
   }
   ```
   
   ?



-- 
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