_getAdminChannelIndex can get the index of the admin channel regardless of case.

This commit is contained in:
Timothy Harder
2024-01-07 14:02:44 -06:00
parent 6dcdf7fc19
commit 52f8e82ea1

View File

@@ -266,11 +266,10 @@ class Node:
def _getAdminChannelIndex(self):
"""Return the channel number of the admin channel, or 0 if no reserved channel"""
c = self.getChannelByName("admin")
if c:
return c.index
else:
return 0
for c in self.channels or []:
if c.settings and c.settings.name.lower() == "admin":
return c.index
return 0
def setOwner(self, long_name=None, short_name=None, is_licensed=False):
"""Set device owner name"""