From 305b22dc6590f6be6f832d86214f2e182c0ac580 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 16 Jan 2026 19:21:58 -0600 Subject: [PATCH] Fix organization_id access: use equipment.site.organization_id --- lib/towerops_web/channels/agent_channel.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/towerops_web/channels/agent_channel.ex b/lib/towerops_web/channels/agent_channel.ex index ef6ad0df..55b6231c 100644 --- a/lib/towerops_web/channels/agent_channel.ex +++ b/lib/towerops_web/channels/agent_channel.ex @@ -268,7 +268,7 @@ defmodule ToweropsWeb.AgentChannel do equipment -> # Verify equipment belongs to agent's organization - if equipment.organization_id == organization_id do + if equipment.site.organization_id == organization_id do case result.job_type do :DISCOVER -> process_discovery_result(equipment, result) :POLL -> process_polling_result(equipment, result)