From 7764845ffd762e7890e5c23e859ea6fae48b6d2e Mon Sep 17 00:00:00 2001 From: David Michaels Date: Sat, 9 Nov 2024 14:50:05 -0500 Subject: [PATCH] expanded application of skip_links=true (used only currently by smaht-submitr) in loadxl. --- CHANGELOG.rst | 7 +++++++ pyproject.toml | 2 +- snovault/loadxl.py | 6 ++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 62072b3ae..d3aabd519 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,13 @@ snovault Change Log ---------- +11.24.0 +======= +* 2024-11-09/dmichaels + - Expanded effects of skip_links=true in loadxl (currently used only by smaht-submitr) + accomodate/workarond occasional issues when loading data locally (from exported production data). + + 11.23.0 ======= * 2024-11-02/dmichaels diff --git a/pyproject.toml b/pyproject.toml index 7ec98d2d3..9b4326c2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dcicsnovault" -version = "11.23.0" +version = "11.23.0.1b1" # TODO: To become 11.24.0 description = "Storage support for 4DN Data Portals." authors = ["4DN-DCIC Team "] license = "MIT" diff --git a/snovault/loadxl.py b/snovault/loadxl.py index 2461b6f8e..b24c83c9c 100644 --- a/snovault/loadxl.py +++ b/snovault/loadxl.py @@ -624,6 +624,8 @@ def get_schema_info(type_name: str) -> (list, list): post_request += '&check_only=true' if skip_links: post_request += "&skip_links=true" + elif skip_links: + post_request += "&skip_links=true" to_post = format_for_attachment(to_post, docsdir) try: # This creates the (as yet non-existent) item to the @@ -701,11 +703,11 @@ def get_schema_info(type_name: str) -> (list, list): raise Exception("Item has no uuid nor any other identifying property; cannot PATCH.") normalized_item, deleted_properties = normalize_deleted_properties(an_item) if deleted_properties: - if validate_only and skip_links: + if skip_links: identifying_path += f"?delete_fields={','.join(deleted_properties)}&skip_links=true" else: identifying_path += f"?delete_fields={','.join(deleted_properties)}" - elif validate_only and skip_links: + elif skip_links: identifying_path += f"?skip_links=true" progress(PROGRESS.PATCH) if progress else None res = testapp.patch_json(identifying_path, normalized_item)