Skip to content

[help wanted]:搜索时,查询为空数据时,无法查询到""(空字符串) #745

@thexqn

Description

@thexqn

Contact Details

No response

What is your question?

请教一个问题。
cmdb-api/api/lib/cmdb/value.py 中 为什么在将“”置为None时,跳过了ValueTypeEnum.TEXT,
该问题会导致搜索时,查询为空数据时,无法查询到""(空字符串),如果方便请帮忙解答,谢谢。

代码片段如下:

        if v == "" and attr.value_type not in (ValueTypeEnum.TEXT,):
            v = None

Version

newest

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions