Skip to content

Fix XML metadata order when moving curated datasets - #38

Merged
jat255 merged 1 commit into
mainfrom
fix/issue-37-curated-dataset-moves
Oct 4, 2026
Merged

jat255 merged 1 commit into
mainfrom
fix/issue-37-curated-dataset-moves

Conversation

@jat255

@jat255 jat255 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #37. Moving a rated or featured dataset between acquisition activities could make the record fail XML schema validation and prevent saving. The move now preserves schema-valid ordering of dataset metadata and curation.

Changes

  • Insert copied activity setup parameters as dataset <meta> elements before <curation> when curation exists.
  • Add a regression test that starts with schema-valid XML, moves a curated dataset, and validates the result against the Nexus experiment XSD. The test also checks that the rating and source setup value are retained.

Testing

  • .venv/bin/python -m django test tests --settings=tests.test_settings — 228 tests passed.
  • git diff --check — passed.

Risks and deployment

This changes XML element placement only when copied setup metadata is added to a curated dataset. No migration or configuration change is required. Deploy the updated application image to make the fix available on the demo.

@jat255 jat255 added the bug Something isn't working label Oct 2, 2026
@jat255
jat255 merged commit 0935dc9 into main Oct 4, 2026
2 checks passed
@jat255
jat255 deleted the fix/issue-37-curated-dataset-moves branch October 4, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Moving curated datasets can produce invalid XML and fail to save

1 participant