Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Fixing No ssidis returned #91

Merged
merged 5 commits into from
May 20, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions nautobot_chatops_ipfabric/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,10 @@ def wireless(dispatcher, option=None, ssid=None):
"""Get wireless information by client or ssid."""
snapshot_id = get_user_snapshot(dispatcher)
logger.debug("Getting SSIDs")
ssids = [(ssidi["wlanSsid"].lower()) for ssidi in ipfabric_api.get_wireless_ssids(snapshot_id)]

if not ssids:

ssids_raw = ipfabric_api.get_wireless_ssids(snapshot_id)

if not ssids_raw:
dispatcher.send_blocks(
[
*dispatcher.command_response_header(
Expand All @@ -705,6 +706,8 @@ def wireless(dispatcher, option=None, ssid=None):
]
)
return True

ssids = [(ssidi["wlanSsid"].lower()) for ssidi in ssids_raw]

if not option:
dispatcher.prompt_from_menu(
Expand Down