Skip to content

Commit dbedfb9

Browse files
fix: fix backwards compatibility for is:not:external search (#455)
* fix: add backwards compatibility for is:not:external search * chore: update openapi.json
1 parent 9c87d1b commit dbedfb9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

backend/editor/models/search_models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def build_cypher_query(self, _param_name: str) -> CypherQuery:
5050
case "external":
5151
return CypherQuery("n.is_external = true")
5252
case "not:external":
53-
return CypherQuery("n.is_external = false")
53+
return CypherQuery("(n.is_external IS NULL OR n.is_external = false)")
5454
case _:
5555
raise ValueError("Invalid filter value")
5656

backend/openapi/openapi.json

+13-1
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,11 @@
12121212
},
12131213
"type": "object",
12141214
"title": "Comments"
1215+
},
1216+
"isExternal": {
1217+
"type": "boolean",
1218+
"title": "Isexternal",
1219+
"default": false
12151220
}
12161221
},
12171222
"type": "object",
@@ -1330,7 +1335,14 @@
13301335
"IsFilterSearchTerm": {
13311336
"properties": {
13321337
"filterType": { "const": "is", "title": "Filtertype" },
1333-
"filterValue": { "const": "root", "title": "Filtervalue" }
1338+
"filterValue": {
1339+
"anyOf": [
1340+
{ "const": "root" },
1341+
{ "const": "external" },
1342+
{ "const": "not:external" }
1343+
],
1344+
"title": "Filtervalue"
1345+
}
13341346
},
13351347
"type": "object",
13361348
"required": ["filterType", "filterValue"],

0 commit comments

Comments
 (0)