Fix organization_id access: use equipment.site.organization_id
This commit is contained in:
parent
6b7a3ba36e
commit
305b22dc65
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue