Skip to content

Commit

Permalink
return activeTransfers path instead of None
Browse files Browse the repository at this point in the history
Connects to archivematica/Issues#252.

This branch is a slightly different approach to the one used in #1287
Here the get_modified_standard_transfer_path() method is modified to return the path to the activeTransfers folder, if no transfer type is defined, rather than returning None.  

This change prevents calls to api/transfer/unapproved from resulting in a 500 error.  The api/transfer/unapproved api call is used in the automation tools workflow here: https://github.com/artefactual/automation-tools/blob/master/transfers/transfer.py#L393

An alternative to this pull request might be to modify the automation tools, so it no longer calls the api/transfer/unapproved endpoint.  I tried to use the newer transfer_async.py (https://github.com/artefactual/automation-tools/blob/master/transfers/transfer_async.py) in automation tools instead of transfer.py, but I couldn't get that to work quickly.  This PR has been tested at IISH, and is working there.
  • Loading branch information
jhsimpson authored and sevein committed Oct 17, 2018
1 parent 797befc commit 8e24b3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dashboard/src/components/api/views.py
Expand Up @@ -444,7 +444,7 @@ def approve_transfer(request):
def get_modified_standard_transfer_path(transfer_type=None):
path = os.path.join(django_settings.WATCH_DIRECTORY, "activeTransfers")
if transfer_type is None:
return None
return path.replace(SHARED_DIRECTORY_ROOT, "%sharedPath%", 1)
try:
path = os.path.join(
path,
Expand Down

0 comments on commit 8e24b3b

Please sign in to comment.