Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expanded application of skip_links=true (used only currently by smaht… #307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading