Skip to content

Commit cd8a251

Browse files
authored
Fix a case statement in NewUI.DeviceLocation (#1857)
1 parent 8117025 commit cd8a251

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/nerves_hub_web/components/new_ui/device_location.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ defmodule NervesHubWeb.Components.NewUI.DeviceLocation do
165165
source_information =
166166
case location["source"] do
167167
"manual" -> "The location was manually configured."
168-
true -> "The location was determined via #{location["source"]} resolution."
168+
_ -> "The location was determined via #{location["source"]} resolution."
169169
end
170170

171171
assigns = Map.put(assigns, :source_information, source_information)

lib/nerves_hub_web/live/devices/show.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ defmodule NervesHubWeb.Live.Devices.Show do
180180
def handle_info(%Broadcast{event: "location:updated"}, socket) do
181181
%{device: device, org: org} = socket.assigns
182182

183-
{:ok, device} = Devices.get_device_by_identifier(org, device.identifier)
183+
{:ok, device} = Devices.get_device_by_identifier(org, device.identifier, :latest_connection)
184184

185185
{:noreply, assign(socket, :device, device)}
186186
end

0 commit comments

Comments
 (0)