FIX: Ensure archive_message does not raise error when unassigned
This commit is contained in:
parent
978f3d74a1
commit
f14653857f
|
@ -545,8 +545,8 @@ after_initialize do
|
|||
topic = info[:topic]
|
||||
next if !topic.assignment
|
||||
|
||||
assigned_to_id = topic.assignment.assigned_to_id
|
||||
assigned_to_type = topic.assignment.assigned_to_type
|
||||
assigned_to_id = topic.assignment&.assigned_to_id
|
||||
assigned_to_type = topic.assignment&.assigned_to_type
|
||||
|
||||
if info[:user]&.id == assigned_to_id && assigned_to_type == "User"
|
||||
TopicTrackingState.publish_assigned_private_message(topic, assigned_to_id)
|
||||
|
|
Loading…
Reference in New Issue