diff --git a/azure-mgmt-automation/azure/mgmt/automation/operations/schedule_operations.py b/azure-mgmt-automation/azure/mgmt/automation/operations/schedule_operations.py index de73d25c4635..87fb2bd6fe07 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/operations/schedule_operations.py +++ b/azure-mgmt-automation/azure/mgmt/automation/operations/schedule_operations.py @@ -93,13 +93,15 @@ def create_or_update( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200, 409]: + if response.status_code not in [200, 201, 409]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize('Schedule', response) + if response.status_code == 201: + deserialized = self._deserialize('Schedule', response) if raw: client_raw_response = ClientRawResponse(deserialized, response)