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

Zipped bag transfers cannot be approved via an API call #221

Closed
helrond opened this issue Sep 28, 2018 · 0 comments

Comments

Projects
None yet
5 participants
@helrond
Copy link

commented Sep 28, 2018

Expected behaviour
Valid Zipped bag transfers can be approved via a POST request as described in the API docs.

Current behaviour
POST requests to the api/transfer/approve endpoint with a payload containing the type of the transfer (zipped bag) and the directory (the transfer filename) return a 500 error. Log message returned is: Unable to start the transfer. There is no job awaiting for a decision.

This is happening because the approve_transfer() function in src/dashboard/src/components/api/views.py appends a trailing slash to the directory value provided by the user.

Steps to reproduce

  1. Start a valid Zipped bag transfer has been started (either by manually uploading or via a POST request as described in the API docs
  2. Send a POST request to the api/transfer/approve endpoint with a payload containing key value pairs for the type of the transfer and the transfer name:
{"type": "zipped bag", "directory": "10fd15d0-6b65-43e6-a8ec-132d1d46f024.tar.gz"}

Your environment (version of Archivematica, OS version, etc)
Archivematica 1.8 (qa/1.x) running docker-compose
Mac OS High Sierra


For Artefactual use:
Please make sure these steps are taken before moving this issue from Review to Verified in Waffle:

  • All PRs related to this issue are properly linked 👍
  • All PRs related to this issue have been merged 👍
  • Test plan for this issue has been implemented and passed 👍
  • Documentation regarding this issue has been written and it has been added to the release notes, if needed 👍
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.