Skip to content

Fix attachments endpoint - #9473

Open
tylerjmchugh wants to merge 2 commits into
geonetwork:mainfrom
tylerjmchugh:fix-attachments-endpoint
Open

Fix attachments endpoint#9473
tylerjmchugh wants to merge 2 commits into
geonetwork:mainfrom
tylerjmchugh:fix-attachments-endpoint

Conversation

@tylerjmchugh

@tylerjmchugh tylerjmchugh commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

#9443 introduced a new method approvedCopyExists to check if the requested version exists. The logic seems to have a bug though as it first checks the working copy repository. So if there is a working copy approvedCopyExists always returns false even if there is an approved copy as well.

This PR aims to fix this issue by instead checking the regular metadata repository first as this is where the approved copy would be.

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@josegar74 josegar74 added this to the 4.4.13 milestone Aug 12, 2026
@tylerjmchugh
tylerjmchugh force-pushed the fix-attachments-endpoint branch from b4f1769 to cda23e2 Compare August 12, 2026 14:52
@tylerjmchugh
tylerjmchugh marked this pull request as ready for review August 12, 2026 15:18
@josegar74

Copy link
Copy Markdown
Member

@tylerjmchugh changes look fine, can you check this updated test file and include the changes?

AbstractStoreApprovedResolutionTest.java

@tylerjmchugh

Copy link
Copy Markdown
Contributor Author

@tylerjmchugh changes look fine, can you check this updated test file and include the changes?

AbstractStoreApprovedResolutionTest.java

Thank you. Updated the test in the latest push.

@ianwallen
ianwallen requested a review from josegar74 August 14, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants