Skip to content

Commit

Permalink
{advisor} Bug fix recommendation list (Azure#26000)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaurabhSharma-MSFT authored Mar 31, 2023
1 parent 9bde773 commit dd7037d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/azure-cli/azure/cli/command_modules/advisor/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def _parse_recommendation_uri(recommendation_uri):
def _generate_recommendations(client):
from msrestazure.azure_exceptions import CloudError

response = client.generate(raw=True)
response = client.generate(cls=_callback)
location = response.headers['Location']
operation_id = _parse_operation_id(location)

Expand Down Expand Up @@ -187,3 +187,7 @@ def _get_recommendations(client, ids=None, resource_group_name=None, recommendat
if recommendation_name:
return [r for r in recs if r.name == recommendation_name]
return recs


def _callback(*args):
return args[0].http_response

0 comments on commit dd7037d

Please sign in to comment.