Skip to content

replace users/me-token-to-replace with /me #694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/msgraph_core/requests/batch_request_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
self.method = request_information.http_method
self._headers = request_information.request_headers
self._body = request_information.content
self.url = request_information.url
self.url = request_information.url.replace('/users/me-token-to-replace', '/me', 1)
self._depends_on: Optional[List[str]] = []
if depends_on is not None:
self.set_depends_on(depends_on)
Expand Down Expand Up @@ -101,7 +101,7 @@ def set_url(self, url: str) -> None:
f"Error occurred during regex replacement of API version in URL string: {url}"
)

relative_url = re.sub(self.ME_TOKEN_REGEX, '/me', relative_url, 1)
relative_url = relative_url.replace('/users/me-token-to-replace', '/me', 1)
if not relative_url:
raise ValueError(
f"""Error occurred during regex replacement
Expand Down