This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new b012768 fix null check for condition threshold to allow 0 values
(#12295)
b012768 is described below
commit b01276808e9604d6f112ac3e8f94f796ba3d6cd0
Author: Moriah Kreeger <[email protected]>
AuthorDate: Tue Jan 5 21:50:21 2021 -0800
fix null check for condition threshold to allow 0 values (#12295)
---
superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
index 3656107..204a188 100644
--- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
+++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
@@ -1201,8 +1201,11 @@ const AlertReportModal:
FunctionComponent<AlertReportModalProps> = ({
name="threshold"
disabled={conditionNotNull}
value={
- currentAlert && currentAlert.validator_config_json
- ? currentAlert.validator_config_json.threshold || ''
+ currentAlert &&
+ currentAlert.validator_config_json &&
+ currentAlert.validator_config_json.threshold !==
+ undefined
+ ? currentAlert.validator_config_json.threshold
: ''
}
placeholder={t('Value')}