Skip to content

Commit

Permalink
api.main: do not reset node ownership fields
Browse files Browse the repository at this point in the history
On update node operation, node ownership fields
shouldn't be changed such as `owner` and `submitter`.

Signed-off-by: Jeny Sadadia <[email protected]>
  • Loading branch information
Jeny Sadadia committed Oct 29, 2024
1 parent d1b28bd commit 1d29b0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,8 @@ async def put_node(node_id: str, node: Node,
# Sanity checks
# Note: do not update node ownership fields, don't update 'state'
# until we've checked the state transition is valid.
update_data = node.dict(exclude={'user', 'user_groups', 'state'})
update_data = node.dict(exclude={'owner', 'submitter',
'user_groups', 'state'})
new_node_def = node_from_id.copy(update=update_data)
# 1- Parse and validate node to specific subtype
specialized_node = parse_node_obj(new_node_def)
Expand Down

0 comments on commit 1d29b0f

Please sign in to comment.