Don't undelete when unlinking a deleted shot.
This commit is contained in:
@@ -244,6 +244,12 @@ def patch_shot(node_id, patch):
|
||||
node_setattr(node, key, value)
|
||||
else:
|
||||
# Remaining operations are for marking as 'in use' or 'not in use'.
|
||||
if node.get('_deleted', False) and op == u'unlink':
|
||||
# We won't undelete a node in response to an unlink request.
|
||||
return pillar.api.utils.jsonify({'_deleted': True,
|
||||
'_etag': node['_etag'],
|
||||
'_id': node['_id']})
|
||||
|
||||
used_in_edit = {
|
||||
u'unlink': False,
|
||||
u'relink': True,
|
||||
@@ -255,9 +261,6 @@ def patch_shot(node_id, patch):
|
||||
return pillar.api.utils.jsonify(r, status=status)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def assert_is_valid_patch(patch):
|
||||
"""Raises an exception when the patch isn't valid."""
|
||||
|
||||
|
Reference in New Issue
Block a user