From 5f1c9025255b308428bd0cf202e2aa095dfa7bb0 Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Tue, 15 Oct 2024 16:27:44 -0400 Subject: [PATCH] fix: `mirror_to_nxcg` --- nx_arangodb/classes/function.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nx_arangodb/classes/function.py b/nx_arangodb/classes/function.py index 3c6e107..ef5ef1b 100644 --- a/nx_arangodb/classes/function.py +++ b/nx_arangodb/classes/function.py @@ -940,7 +940,12 @@ def mirror_to_nxcg(func): def wrapper(self, *args, **kwargs): result = func(self, *args, **kwargs) if self.mirror_crud_to_nxcg and self.nxcg_graph is not None: - getattr(self.nxcg_graph, func.__name__)(*args, **kwargs) + if "_override" not in func.__name__: + m = f"Function '{func.__name__}' is not an override function." + raise ValueError(m) + + func_name = func.__name__.replace("_override", "") + getattr(self.nxcg_graph, func_name)(*args, **kwargs) return result return wrapper