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

update method of TransferViewSet produces an error #499

Closed
helrond opened this issue Aug 20, 2021 · 0 comments
Closed

update method of TransferViewSet produces an error #499

helrond opened this issue Aug 20, 2021 · 0 comments
Assignees

Comments

@helrond
Copy link
Member

helrond commented Aug 20, 2021

Describe the bug

POST requests to TransferViewSet produce an error:
join() argument must be str or bytes, not \'NoneType\'

Expected behavior

POST requests SHOULD NOT trigger an error message but SHOULD trigger a run of the Aurora CleanupRoutine.

Additional context

I am pretty sure this is happening because the view is expecting an "identifier" to be passed with the request data. HOWEVER, I'm not sure that it's necessary to pass this data, because it should be possible to just get the machine_file_identifier based on the model instance which is being targeted. IOW, I think lines 92 and 93 should look like:

transfer = get_object_or_404(Transfer, pk=pk)
CleanupRoutine().run(transfer.machine_file_identifier)

You might need to import get_object_or_404 from django.shortcuts.

Tests should also be looked at

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

No branches or pull requests

2 participants