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 1f2cd5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ 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'})

Check warning on line 675 in api/main.py

View workflow job for this annotation

GitHub Actions / Lint

line too long (83 > 79 characters)
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 1f2cd5d

Please sign in to comment.