From 7773ffcd96bd7850820238b9a374755a5578ba92 Mon Sep 17 00:00:00 2001 From: Frank Sachsenheim Date: Sun, 3 Nov 2024 23:43:41 +0100 Subject: [PATCH] There are no NodeResources from nothing i may be wrong with that assessment. --- snakesist/exist_client.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/snakesist/exist_client.py b/snakesist/exist_client.py index b3826ec..6c2cdf0 100644 --- a/snakesist/exist_client.py +++ b/snakesist/exist_client.py @@ -91,23 +91,15 @@ class NodeResource: def __init__( self, exist_client: "ExistClient", - query_result: Optional[QueryResultItem] = None, + query_result: QueryResultItem, ): - self.node: Optional[NodeBase] - self._exist_client = exist_client - - if query_result: - ( - self._abs_resource_id, - self._node_id, - self._document_path, - self.node, - ) = query_result - else: - self._abs_resource_id = self._node_id = "" - self.node = None - self._document_path = "" + ( + self._abs_resource_id, + self._node_id, + self._document_path, + self.node, + ) = query_result def __str__(self): return str(self.node)