-
Notifications
You must be signed in to change notification settings - Fork 103
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
arrange_contents: fix calling without the path
parameter
#268
Conversation
aa30f80
to
2869d1a
Compare
except TypeError: | ||
response = { | ||
'success': False, | ||
'message': 'Could not base64-decoded provided path: ' + path, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use % or .format or str(), since +
will fail if path is not a basestring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed! Too much time in JS land...
2869d1a
to
cfe0766
Compare
DEFAULT_ARRANGE_PATH is not base64-encoded; trying to decode it raises an exception.
cfe0766
to
dffa086
Compare
dffa086
to
0a93de7
Compare
'success': False, | ||
'message': 'Could not base64-decoded provided path: ' + path, | ||
} | ||
helpers.json_response(response, status_code=400) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.djangoproject.com/en/1.8/ref/request-response/#jsonresponse-objects :o Probably not for this PR but I'd like to replace helpers.json_response
with JsonResponse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, in the future let's make that change all at once.
👍 |
If a location is not a an AIP Storage-purposed (AS) location, then it should not be possible to assign a replicator location to it. Fixes issue #268.
DEFAULT_ARRANGE_PATH
is not base64-encoded; trying to decode it raises an exception.