From 87cc5d4cc7fbabf46b552fbdf0f27f5a8424d4b3 Mon Sep 17 00:00:00 2001 From: Jamie Date: Sun, 23 Sep 2018 21:30:51 +0100 Subject: [PATCH] Fixed the issue with notifications not sending --- .../NotificationMessageCurlys.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Ombi.Notifications/NotificationMessageCurlys.cs b/src/Ombi.Notifications/NotificationMessageCurlys.cs index 5bc74f68e..1b655b84d 100644 --- a/src/Ombi.Notifications/NotificationMessageCurlys.cs +++ b/src/Ombi.Notifications/NotificationMessageCurlys.cs @@ -17,7 +17,11 @@ namespace Ombi.Notifications public void Setup(NotificationOptions opts, FullBaseRequest req, CustomizationSettings s, UserNotificationPreferences pref) { LoadIssues(opts); - UserPreference = pref.Enabled ? pref.Value : string.Empty; + if (pref != null) + { + UserPreference = pref.Enabled ? pref.Value : string.Empty; + } + string title; if (req == null) { @@ -62,7 +66,10 @@ namespace Ombi.Notifications public void Setup(NotificationOptions opts, AlbumRequest req, CustomizationSettings s, UserNotificationPreferences pref) { LoadIssues(opts); - UserPreference = pref.Enabled ? pref.Value : string.Empty; + if (pref != null) + { + UserPreference = pref.Enabled ? pref.Value : string.Empty; + } string title; if (req == null) { @@ -106,7 +113,10 @@ namespace Ombi.Notifications public void Setup(NotificationOptions opts, ChildRequests req, CustomizationSettings s, UserNotificationPreferences pref) { LoadIssues(opts); - UserPreference = pref.Enabled ? pref.Value : string.Empty; + if (pref != null) + { + UserPreference = pref.Enabled ? pref.Value : string.Empty; + } string title; if (req == null) {