From 1aaa22c1783476612c997b0804e70db4311a6570 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Sun, 16 Mar 2025 07:54:03 +1100 Subject: [PATCH] OPENWRT/LUCI #1010 --- front/plugins/luci_import/script.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/front/plugins/luci_import/script.py b/front/plugins/luci_import/script.py index 825f3dc6..5eaa578a 100755 --- a/front/plugins/luci_import/script.py +++ b/front/plugins/luci_import/script.py @@ -37,11 +37,17 @@ def main(): for entry in device_data: mylog('verbose', [f'[{pluginName}] found: ', str(entry.mac).lower()]) + + name = str(entry.hostname) + + if name.lower() == 'none': + name = '(unknown)' + plugin_objects.add_object( primaryId = str(entry.mac).lower(), secondaryId = entry.ip, watched1 = entry.host, - watched2 = str(entry.hostname), + watched2 = name, watched3 = "", watched4 = "", extra = pluginName,