Fix organization_id access: use equipment.site.organization_id

This commit is contained in:
Graham McIntire 2026-01-16 19:21:58 -06:00
parent 6b7a3ba36e
commit 305b22dc65
No known key found for this signature in database

View file

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