From cfc7e64cbb42cf67cdc4fbb75c364800527a59d8 Mon Sep 17 00:00:00 2001 From: Ali Date: Tue, 2 Apr 2024 17:41:31 -0400 Subject: [PATCH] bit of a strange bug with inventory --- src/cript/api/api.py | 13 ++++++++----- tests/nodes/primary_nodes/test_project.py | 1 - 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/cript/api/api.py b/src/cript/api/api.py index 63fcd0f4..982e88b1 100644 --- a/src/cript/api/api.py +++ b/src/cript/api/api.py @@ -457,11 +457,14 @@ def save(self, new_node: PrimaryBaseNode) -> None: # Do the POST request call. only on project # or else its a patch handled by previous node - # if new_node.node_type == "project" - data = new_node.get_json().json - response = self._capsule_request(url_path="/project/", method="POST", data=data) - print("----700----") - print(response.json) + print("--------900---------") + print(new_node.node_type.lower()) + if new_node.node_type.lower() == "project": + data = new_node.get_json().json + response = self._capsule_request(url_path="/project/", method="POST", data=data) + print("----700----") + print(response.json()) + return # Return here, since we are done after Posting # This is where a patch is needed (we do it below) diff --git a/tests/nodes/primary_nodes/test_project.py b/tests/nodes/primary_nodes/test_project.py index 4d7a8079..76a2d5ba 100644 --- a/tests/nodes/primary_nodes/test_project.py +++ b/tests/nodes/primary_nodes/test_project.py @@ -5,7 +5,6 @@ import pytest import cript -from cript.nodes.util import load_nodes_from_json from tests.utils.integration_test_helper import ( delete_integration_node_helper, save_integration_node_helper,