Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Breaking Changes

### Bugs Fixed
- The operation `id` under `details` of the poller object now populates correctly.

### Other Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ def details(self):

:rtype: ~azure.ai.translation.document.TranslationStatus
"""
return TranslationStatus._from_generated( # pylint: disable=protected-access
self._polling_method._current_body # pylint: disable=protected-access
)
if self._polling_method._current_body: # pylint: disable=protected-access
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: include as bug fix in changelog

return TranslationStatus._from_generated( # pylint: disable=protected-access
self._polling_method._current_body # pylint: disable=protected-access
)
return TranslationStatus(id=self._polling_method._get_id_from_headers()) # pylint: disable=protected-access

@classmethod
def from_continuation_token(cls, polling_method, continuation_token, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ def details(self) -> TranslationStatus:

:rtype: ~azure.ai.translation.document.TranslationStatus
"""
return TranslationStatus._from_generated( # pylint: disable=protected-access
self._polling_method._current_body # pylint: disable=protected-access
)
if self._polling_method._current_body: # pylint: disable=protected-access
return TranslationStatus._from_generated( # pylint: disable=protected-access
self._polling_method._current_body # pylint: disable=protected-access
)
return TranslationStatus(id=self._polling_method._get_id_from_headers()) # pylint: disable=protected-access

@classmethod
def from_continuation_token(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def list_all_translation_statuses(self, **kwargs):
format: ["param1 asc/desc", "param2 asc/desc", ...]
(ex: 'created_on asc', 'created_on desc').
:return: A pageable of TranslationStatus.
:rtype: ~azure.core.paging.ItemPaged[TranslationStatus]
:rtype: ~azure.core.async_paging.AsyncItemPaged[TranslationStatus]
:raises ~azure.core.exceptions.HttpResponseError:

.. admonition:: Example:
Expand Down Expand Up @@ -336,7 +336,7 @@ def list_all_document_statuses(self, translation_id, **kwargs):
format: ["param1 asc/desc", "param2 asc/desc", ...]
(ex: 'created_on asc', 'created_on desc').
:return: A pageable of DocumentStatus.
:rtype: ~azure.core.paging.ItemPaged[DocumentStatus]
:rtype: ~azure.core.async_paging.AsyncItemPaged[DocumentStatus]
:raises ~azure.core.exceptions.HttpResponseError:

.. admonition:: Example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async def _begin_and_validate_translation_async(self, async_client, translation_
# submit operation
poller = await async_client.begin_translation(translation_inputs)
self.assertIsNotNone(poller.id)
self.assertIsNotNone(poller.details.id)
# wait for result
doc_statuses = await poller.result()
# validate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ def _begin_and_validate_translation(self, client, translation_inputs, total_docs
# submit job
poller = client.begin_translation(translation_inputs)
self.assertIsNotNone(poller.id)
self.assertIsNotNone(poller.details.id)
# wait for result
result = poller.result()
# validate
Expand Down