Skip to content

Commit 52a812b

Browse files
committed
SUMO-237698: handle null in email notification timezone
1 parent 6064499 commit 52a812b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
ENHANCEMENTS:
44
* Added support for custom window sizes for the CSE Rules (Aggregation, Chain, Threshold). (GH-623)
55

6+
BUG FIXES:
7+
* Fix error while importing monitor having timeZone as `null` in its Email notification object ()
8+
69
## 2.28.3 (March 5, 2024)
710

811
BUG FIXES:

sumologic/resource_sumologic_monitors_library_monitor.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,9 @@ func resourceSumologicMonitorsLibraryMonitorRead(d *schema.ResourceData, meta in
846846
internalNotification["subject"] = internalNotificationDict["subject"].(string)
847847
internalNotification["recipients"] = internalNotificationDict["recipients"].([]interface{})
848848
internalNotification["message_body"] = internalNotificationDict["messageBody"].(string)
849-
internalNotification["time_zone"] = internalNotificationDict["timeZone"].(string)
849+
if internalNotificationDict["timeZone"] != nil {
850+
internalNotification["time_zone"] = internalNotificationDict["timeZone"].(string)
851+
}
850852
} else {
851853
internalNotification["action_type"] = "NamedConnectionAction"
852854
internalNotification["connection_id"] = internalNotificationDict["connectionId"].(string)

0 commit comments

Comments
 (0)