Skip to content

Commit

Permalink
Detects the return value and returns None if the return value is empty (
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred-sun authored and Justwmz committed Nov 4, 2024
1 parent a1203c0 commit 6cb07ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/modules/azure_rm_gallery_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ def list(self):
return [self.format_item(x) for x in results['value']] if results['value'] else []

def format_item(self, item):
if not item:
return
d = {
'id': item['id'],
'name': item['name'],
Expand Down

0 comments on commit 6cb07ec

Please sign in to comment.