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 Mar 22, 2024
1 parent e5da317 commit 3c25449
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 3c25449

Please sign in to comment.