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

arrange_contents: fix calling without the path parameter #268

Merged
merged 2 commits into from
Sep 2, 2015

Conversation

mistydemeo
Copy link
Contributor

DEFAULT_ARRANGE_PATH is not base64-encoded; trying to decode it raises an exception.

@qubot qubot force-pushed the dev/issue-XXXX-arrange_contents branch from aa30f80 to 2869d1a Compare September 2, 2015 18:15
except TypeError:
response = {
'success': False,
'message': 'Could not base64-decoded provided path: ' + path,
Copy link
Contributor

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.

Copy link
Contributor Author

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...

@qubot qubot force-pushed the dev/issue-XXXX-arrange_contents branch from 2869d1a to cfe0766 Compare September 2, 2015 23:56
DEFAULT_ARRANGE_PATH is not base64-encoded; trying to decode it raises
an exception.
@qubot qubot force-pushed the dev/issue-XXXX-arrange_contents branch from cfe0766 to dffa086 Compare September 2, 2015 23:56
@qubot qubot force-pushed the dev/issue-XXXX-arrange_contents branch from dffa086 to 0a93de7 Compare September 2, 2015 23:57
'success': False,
'message': 'Could not base64-decoded provided path: ' + path,
}
helpers.json_response(response, status_code=400)
Copy link
Contributor

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

Copy link
Contributor Author

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.

@Hwesta
Copy link
Contributor

Hwesta commented Sep 2, 2015

👍

@qubot qubot merged commit 0a93de7 into qa/1.x Sep 2, 2015
@qubot qubot deleted the dev/issue-XXXX-arrange_contents branch September 2, 2015 23:59
@Hwesta Hwesta added this to the 1.5.0 milestone Sep 21, 2015
mamedin pushed a commit that referenced this pull request Sep 30, 2019
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.
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.

3 participants