microsoftgraph / microsoftgraph/msgraph-sdk-python

Filter clause not working anymore in ItemsRequestBuilderGetQueryParameters

未关闭
#1,043 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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_

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先使用 ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters 和 RequestConfiguration,针对 SDK 版本 1.15.0 运行报告中的复现步骤。将结果与建议的 ChildrenRequestBuilder workaround 进行比较,并验证过滤器是否已发送且已应用。完成的标准是请求只返回名为 "some_name" 的文件夹。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。