mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
new chillmaid approved error messages
these get shown on the front-end so make sure their content is good
This commit is contained in:
@@ -141,11 +141,8 @@ def move_to_template_folder(service_id, target_template_folder_id=None):
|
||||
|
||||
def _validate_folder_move(target_template_folder, target_template_folder_id, template_folder, template_folder_id):
|
||||
if str(target_template_folder_id) == str(template_folder_id):
|
||||
msg = 'Could not move folder to itself'
|
||||
msg = 'You cannot move a folder to itself'
|
||||
raise InvalidRequest(msg, status_code=400)
|
||||
if target_template_folder and template_folder.is_parent_of(target_template_folder):
|
||||
msg = 'Could not move to folder: {} is an ancestor of target folder {}'.format(
|
||||
template_folder_id,
|
||||
target_template_folder_id
|
||||
)
|
||||
msg = 'You cannot move a folder to one of its subfolders'
|
||||
raise InvalidRequest(msg, status_code=400)
|
||||
|
||||
Reference in New Issue
Block a user