diff --git a/lib/towerops_web/live/graph_live/show.ex b/lib/towerops_web/live/graph_live/show.ex index fa19322e..99c79291 100644 --- a/lib/towerops_web/live/graph_live/show.ex +++ b/lib/towerops_web/live/graph_live/show.ex @@ -4,7 +4,6 @@ defmodule ToweropsWeb.GraphLive.Show do alias Towerops.Devices alias Towerops.Monitoring - alias Towerops.Repo alias Towerops.Snmp # Maximum live data points (5 minutes at 1 second intervals) @@ -631,10 +630,9 @@ defmodule ToweropsWeb.GraphLive.Show do |> push_navigate(to: ~p"/devices") device -> - device = Repo.preload(device, site: :organization) organization = socket.assigns.current_scope.organization - if device.site.organization_id == organization.id do + if device.organization_id == organization.id do poll_and_update_buffer(socket, device) else socket