FIX: Ensure move_to_inbox does not raise error when unassigned (#190)
This commit is contained in:
parent
9d7d39705e
commit
978f3d74a1
|
@ -518,8 +518,8 @@ after_initialize do
|
|||
|
||||
on(:move_to_inbox) do |info|
|
||||
topic = info[:topic]
|
||||
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