Skip to content

Commit 110d71e

Browse files
skip NULL values during property validation
1 parent 23bfa1f commit 110d71e

File tree

1 file changed

+2
-0
lines changed
  • mcp_server/src/mcp_server_neo4j_gds

1 file changed

+2
-0
lines changed

mcp_server/src/mcp_server_neo4j_gds/gds.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def validate_rel_properties(gds: GraphDataScience, rel_properties, node_labels=N
223223
f"""
224224
{match_rel_query}
225225
WITH r.{rel_properties[i]} AS prop
226+
WHERE prop IS NOT NULL
226227
WITH
227228
CASE
228229
WHEN prop IS :: FLOAT THEN 1
@@ -253,6 +254,7 @@ def validate_node_properties(gds: GraphDataScience, node_properties, node_labels
253254
f"""
254255
{match_node_query}
255256
WITH n.{node_properties[i]} AS prop
257+
WHERE prop IS NOT NULL
256258
RETURN
257259
prop IS :: LIST<FLOAT NOT NULL> AS IS_LIST_FLOAT,
258260
prop IS :: LIST<INTEGER NOT NULL> AS IS_LIST_INTEGER,

0 commit comments

Comments
 (0)