From c46e25370e230d0d91cf439a4a2aa85429f0b962 Mon Sep 17 00:00:00 2001 From: Michael Chin Date: Wed, 3 Apr 2024 16:34:08 -0700 Subject: [PATCH 1/2] Fix NoneType serialization for OC query params --- src/graph_notebook/magics/graph_magic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/graph_notebook/magics/graph_magic.py b/src/graph_notebook/magics/graph_magic.py index 56980f59..0d28cc96 100644 --- a/src/graph_notebook/magics/graph_magic.py +++ b/src/graph_notebook/magics/graph_magic.py @@ -3097,10 +3097,11 @@ def handle_opencypher_query(self, line, cell, local_ns): else: query_params_input = args.query_parameters if isinstance(query_params_input, dict): - query_params = query_params_input + query_params = json.dumps(query_params_input) else: try: - query_params = json.loads(query_params_input.replace("'", '"')) + query_params_dict = json.loads(query_params_input.replace("'", '"')) + query_params = json.dumps(query_params_dict) except Exception as e: print(f"Invalid query parameter input, ignoring.") From 70db310491dddc47f55ab68230c9be3be7c48e90 Mon Sep 17 00:00:00 2001 From: Michael Chin Date: Wed, 3 Apr 2024 16:57:25 -0700 Subject: [PATCH 2/2] update changelog --- ChangeLog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog.md b/ChangeLog.md index 07aba026..fd3ae5ef 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -14,6 +14,7 @@ Starting with v1.31.6, this file will contain a record of major features and upd - Added `--store-format` option to query magics ([Link to PR](https://github.com/aws/graph-notebook/pull/580)) - Added `--export-to` CSV file option to query magics ([Link to PR](https://github.com/aws/graph-notebook/pull/582)) - Fixed unintended formatting in `%%oc explain` widget ([Link to PR](https://github.com/aws/graph-notebook/pull/576)) +- Fixed serialization of NoneType for `%%oc` query parameters ([Link to PR](https://github.com/aws/graph-notebook/pull/584)) - Changed `%load` parameter and default value for failOnError ([Link to PR](https://github.com/aws/graph-notebook/pull/577)) ## Release 4.1.0 (February 1, 2024)