Fixed the issue with notifications not sending

This commit is contained in:
Jamie 2018-09-23 21:30:51 +01:00
parent 55963085bc
commit 87cc5d4cc7

View file

@ -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)
{