Skip to content

Commit

Permalink
expanded application of skip_links=true (used only currently by smaht…
Browse files Browse the repository at this point in the history
…-submitr) in loadxl.
  • Loading branch information
dmichaels-harvard committed Nov 9, 2024
1 parent b51a8e1 commit 7764845
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
license = "MIT"
Expand Down
6 changes: 4 additions & 2 deletions snovault/loadxl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7764845

Please sign in to comment.