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

[SVCS-294] Add rename validation #213

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Prev Previous commit
fix whitespace
  • Loading branch information
Johnetordoff committed Jan 16, 2018
commit 101378fbad7059d4daddaa65d2404e7a971e72da
4 changes: 2 additions & 2 deletions waterbutler/server/api/v1/provider/movecopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def move_or_copy(self):
self.path = await self.provider.validate_v1_path(self.path, **self.arguments)

if auth_action == 'rename': # 'rename' implies the file/folder does not change location

if not self.json.get('rename'):
raise exceptions.InvalidParameters('Rename is required for renaming')
self.provider.validate_rename(self.json.get('rename'), self.path.is_dir)
Expand All @@ -108,7 +108,7 @@ async def move_or_copy(self):
self.dest_path = self.path.parent
self.dest_resource = self.resource

action = 'move'
provider_action = 'move'
else:
path = self.json.get('path', None)
if path is None:
Expand Down