From a450c49494fadf0d84fc27e7ada9c8091c6ba492 Mon Sep 17 00:00:00 2001 From: Heiko Date: Thu, 16 Aug 2018 08:48:53 +0200 Subject: [PATCH] fixing gharial graph constructor for community and mmfiles (#6154) --- arangod/Graph/Graph.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arangod/Graph/Graph.cpp b/arangod/Graph/Graph.cpp index 6852287c9e..6b74f9cd3f 100644 --- a/arangod/Graph/Graph.cpp +++ b/arangod/Graph/Graph.cpp @@ -54,11 +54,17 @@ using VelocyPackHelper = basics::VelocyPackHelper; #ifndef USE_ENTERPRISE // Factory methods std::unique_ptr Graph::fromPersistence(VPackSlice document, TRI_vocbase_t& vocbase) { + if (document.isExternal()) { + document = document.resolveExternal(); + } std::unique_ptr result{new Graph{document}}; return result; } std::unique_ptr Graph::fromUserInput(std::string&& name, VPackSlice document, VPackSlice options) { + if (document.isExternal()) { + document = document.resolveExternal(); + } std::unique_ptr result{new Graph{std::move(name), document, options}}; return result; } @@ -66,7 +72,6 @@ std::unique_ptr Graph::fromUserInput(std::string&& name, VPackSlice docum std::unique_ptr Graph::fromUserInput(std::string const& name, VPackSlice document, VPackSlice options) { return Graph::fromUserInput(std::string{name}, document, options); - } // From persistence