Skip to content

Commit

Permalink
Remove overriding of copy_elements parameter
Browse files Browse the repository at this point in the history
Prevent unexpected behaviour of the API.
Actually raise `RequestParameterInvalidException` exception if this
conflicts with `copy_required` (i.e. dbkey not None).
  • Loading branch information
nsoranzo committed Sep 27, 2023
1 parent 784200b commit d26186f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/webapps/galaxy/services/history_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,9 +1269,9 @@ def __create_dataset_collection(
raise exceptions.RequestParameterMissingException("'content' id of target to copy is missing")
dbkey = payload.dbkey
copy_required = dbkey is not None
copy_elements = payload.copy_elements or copy_required
copy_elements = payload.copy_elements
if copy_required and not copy_elements:
raise exceptions.RequestParameterMissingException(
raise exceptions.RequestParameterInvalidException(
"copy_elements passed as 'false' but it is required to change specified attributes"
)
dataset_instance_attributes = {}
Expand Down

0 comments on commit d26186f

Please sign in to comment.