Skip to content
Merged
Changes from all 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
11 changes: 10 additions & 1 deletion plugins/modules/device_credential_playbook_config_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,15 @@ def get_global_credential_details_configuration(self, network_element, filters):
"DEBUG"
)
mapped = mapped_list[0] if mapped_list else {}
if not mapped:
self.log(
"No credentials mapped after transformation. Final mapped structure is "
"empty. This may indicate invalid filters or missing credential data. "
"Returning empty credential details.",
"WARNING"
)
return None

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new line after this.


return {"global_credential_details": mapped}

def filter_credentials(self, source, filters):
Expand Down Expand Up @@ -1587,7 +1596,7 @@ def get_assign_credentials_to_site_configuration(self, network_element, filters)
"assignment dictionary.".format(site_names),
"WARNING"
)
return {"assign_credentials_to_site": {}}
return None

self.log(
"Initializing credential ID to group mapping for credential matching. "
Expand Down
Loading