Skip to content

Commit

Permalink
fix: mirror_to_nxcg
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna committed Oct 15, 2024
1 parent 4436b50 commit 5f1c902
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nx_arangodb/classes/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5f1c902

Please sign in to comment.