diff --git a/app/listeners/notification_listener.rb b/app/listeners/notification_listener.rb index 666bc4d13..7adde69c6 100644 --- a/app/listeners/notification_listener.rb +++ b/app/listeners/notification_listener.rb @@ -33,6 +33,11 @@ class NotificationListener < BaseListener return if event.data[:notifiable_assignee_change].blank? return if conversation.pending? + if assignee.nil? + Rail.logger.error "[NotificationListener] Assignee is nil, skipping notification creation for #{conversation.id}" + return + end + NotificationBuilder.new( notification_type: 'conversation_assignment', user: assignee,