Skip to content

Commit ae192cd

Browse files
committed
Adding null check for export_format
1 parent b4480b8 commit ae192cd

File tree

2 files changed

+50
-50
lines changed

2 files changed

+50
-50
lines changed

src/azure-cli/azure/cli/command_modules/resource/custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,7 @@ def export_group_as_template(
17211721
for detail in getattr(error, 'details', None) or []:
17221722
logger.error(detail.message)
17231723

1724-
return result.output if export_format.lower() == "bicep" else result.template
1724+
return result.output if export_format and export_format.lower() == "bicep" else result.template
17251725

17261726

17271727
def create_application(cmd, resource_group_name,

0 commit comments

Comments
 (0)