Skip to content

Commit 8276302

Browse files
committed
workaround for sdk issue
1 parent 807defa commit 8276302

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • src/azure-cli/azure/cli/command_modules/cognitiveservices

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,9 @@ def managed_network_provision(
22682268
"""
22692269
Provision the managed network for an Azure Cognitive Services account.
22702270
"""
2271-
return client.begin_provision_managed_network(resource_group_name, account_name, managed_network_name, body={})
2271+
# Pass body as pre-serialized bytes to work around an issue where empty dict {}
2272+
# is falsy in Python, causing content_type to be set to None while body is still serialized.
2273+
return client.begin_provision_managed_network(resource_group_name, account_name, managed_network_name, body=b'{}')
22722274

22732275

22742276
def managed_network_show(

0 commit comments

Comments
 (0)