fix: set _drive_id_endpoint before early return in SharePointReader._get_drive_id#20837
Open
Br1an67 wants to merge 1 commit intorun-llama:mainfrom
Open
fix: set _drive_id_endpoint before early return in SharePointReader._get_drive_id#20837Br1an67 wants to merge 1 commit intorun-llama:mainfrom
Br1an67 wants to merge 1 commit intorun-llama:mainfrom
Conversation
AstraBert
approved these changes
Mar 2, 2026
Member
AstraBert
left a comment
There was a problem hiding this comment.
You need to bump the version of the integration for it to be published
…get_drive_id When drive_id is provided directly to SharePointReader, _get_drive_id() returned early without setting _drive_id_endpoint, causing AttributeError in downstream methods like _get_sharepoint_folder_id, _get_permissions_info, _list_folder_contents, and _list_drive_contents. Moved the _drive_id_endpoint assignment before the early return checks so it is always set regardless of how the drive ID is resolved. Bump llama-index-readers-microsoft-sharepoint version to 0.8.1.
c322bba to
b4fca42
Compare
Author
|
Thanks for the review! Bumped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When
drive_idis provided directly toSharePointReader,_get_drive_id()returned early without setting_drive_id_endpoint, causingAttributeErrorin downstream methods like_get_sharepoint_folder_id,_get_permissions_info,_list_folder_contents, and_list_drive_contents.Moved the
_drive_id_endpointassignment before the early return checks so it is always set regardless of how the drive ID is resolved.Fixes #18753
New Package?
Version Bump?
llama-index-readers-microsoft-sharepointbumped from0.8.0→0.8.1Type of Change
How Has This Been Tested?
Added
test_drive_id_endpoint_set_when_drive_id_providedwhich verifies that_drive_id_endpointis properly set whendrive_idis provided directly.Suggested Checklist:
uv run make format; uv run make lintto appease the lint gods