You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/10/13 02:25:29 UTC

[GitHub] [dolphinscheduler] fuchanghai commented on a diff in pull request #12340: [Fix-12339][Api] Fix optional query parameter miss default value issue #12339

fuchanghai commented on code in PR #12340:
URL: https://github.com/apache/dolphinscheduler/pull/12340#discussion_r994049488


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/SchedulerController.java:
##########
@@ -158,7 +158,7 @@ public Result updateSchedule(@ApiIgnore @RequestAttribute(value = SESSION_USER)
                                  @PathVariable(value = "id") Integer id,
                                  @RequestParam(value = "schedule") String schedule,
                                  @RequestParam(value = "warningType", required = false, defaultValue = DEFAULT_WARNING_TYPE) WarningType warningType,
-                                 @RequestParam(value = "warningGroupId", required = false) int warningGroupId,
+                                 @RequestParam(value = "warningGroupId", required = false, defaultValue = DEFAULT_NOTIFY_GROUP_ID) int warningGroupId,

Review Comment:
   if warningType is None , value of ```warningGroupId``` should be null. so i don't think ```warningGroupId``` be point default value. maybe we should change the type of ```warningGroupId``` to Integer .WDYT? cc @SbloodyS @EricGao888 @caishunfeng 



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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