This is an automated email from the ASF dual-hosted git repository.
kerwin pushed a commit to branch 3.1.2-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/3.1.2-prepare by this push:
new 00cb3f85ec cherry-pick Fix sql task will send alert if we don't choose
the send email #12984
00cb3f85ec is described below
commit 00cb3f85eccb54f1a2d427c656f88d0fc1b61b1d
Author: Wenjun Ruan <[email protected]>
AuthorDate: Thu Nov 24 21:26:52 2022 +0800
cherry-pick Fix sql task will send alert if we don't choose the send email
#12984
---
.../main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
index 178c9c335c..0e56d7d6c9 100644
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
+++
b/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
@@ -274,7 +274,7 @@ public class SqlTask extends AbstractTask {
}
}
String result = JSONUtils.toJsonString(resultJSONArray);
- if (sqlParameters.getSendEmail() == null ||
sqlParameters.getSendEmail()) {
+ if (Boolean.TRUE.equals(sqlParameters.getSendEmail())) {
sendAttachment(sqlParameters.getGroupId(),
StringUtils.isNotEmpty(sqlParameters.getTitle())
? sqlParameters.getTitle()
: taskExecutionContext.getTaskName() + " query result
sets", result);