microsoftgraph / microsoftgraph/msgraph-sdk-python
Filter clause not working anymore in ItemsRequestBuilderGetQueryParameters
未關閉
還沒有人認領這個 Issue。
priority:p2
type:bug
- 主要語言
- Python
- 星號
- 630
- 分支
- 96
- 平均合併
- 15 小時 20 分鐘
- 30 天內合併 PR
- 3
描述
Describe the bug
I have a query that's using this code to retrieve a folder by name:
onedrive = await client.me.drive.get()
query_params = ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters(
filter="name eq 'some_name'"
)
config = RequestConfiguration(query_parameters=query_params)
subfolder = (await client.drives.by_drive_id(onedrive.id).items.get(request_configuration=config)).value
but suddenly it's not working anymore.
The filter based on the name just returns all 200 subfolders of onedrive.
Expected behavior
Just the folder with "some_name" is retrieved
How to reproduce
onedrive = await client.me.drive.get()
query_params = ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters(
filter="name eq 'some_name'"
)
config = RequestConfiguration(query_parameters=query_params)
subfolder = (await client.drives.by_drive_id(onedrive.id).items.get(request_configuration=config)).value
SDK Version
1.15.0
Latest version known to work for scenario above?
No response
Known Workarounds
Maybe switching to ChildrenRequestBuilder and using items.by_drive_items_id(ID).children.get(query_params with name filter)
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先使用 ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters 和 RequestConfiguration,針對 SDK 版本 1.15.0 執行回報的重現步驟。將結果與建議的 ChildrenRequestBuilder workaround 進行比較,並驗證篩選器是否已傳送且已套用。完成的標準是要求只回傳名為 "some_name" 的資料夾。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- api
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100