fix flaky id in polling (#19921)
This commit is contained in:
Родитель
f0f09cf5c2
Коммит
ee646d7c5d
|
@ -94,7 +94,7 @@ class DocumentTranslationLROPollingMethod(LROBasePolling):
|
|||
|
||||
def _get_id_from_headers(self):
|
||||
# type: () -> str
|
||||
return self._pipeline_response.http_response.headers[
|
||||
return self._initial_response.http_response.headers[
|
||||
"Operation-Location"
|
||||
].split("/batches/")[1]
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ class AsyncDocumentTranslationLROPollingMethod(AsyncLROBasePolling):
|
|||
return _TranslationStatus.deserialize(self._pipeline_response)
|
||||
|
||||
def _get_id_from_headers(self) -> str:
|
||||
return self._pipeline_response.http_response.headers[
|
||||
return self._initial_response.http_response.headers[
|
||||
"Operation-Location"
|
||||
].split("/batches/")[1]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче