state-routes: use get_count() instead of next()

We cannot use next() as the properties are not a Lua table anymore.
This commit is contained in:
Julian Bouzas 2025-10-28 09:41:38 -04:00 committed by George Kiagiadakis
parent be6f2b2926
commit 15d98f59e5

View file

@ -114,7 +114,7 @@ apply_route_props_hook = SimpleEventHook {
local dev_info = devinfo:get_device_info (device)
assert (dev_info)
if next (selected_routes) == nil then
if selected_routes:get_count () == 0 then
log:info (device, "No routes selected to set on " .. dev_info.name)
return
end