diff --git a/lib/galaxy/model/dataset_collections/types/record.py b/lib/galaxy/model/dataset_collections/types/record.py index 3bc10a587171..276a953149f5 100644 --- a/lib/galaxy/model/dataset_collections/types/record.py +++ b/lib/galaxy/model/dataset_collections/types/record.py @@ -30,7 +30,7 @@ def generate_elements(self, elements, **kwds): def prototype_elements(self, fields=None, **kwds): if fields is None: - raise RequestParameterMissingException("Missing or null parameter fields required for record types.") + raise RequestParameterMissingException("Missing or null parameter 'fields' required for record types.") for field in fields: name = field.get("name", None) assert name diff --git a/lib/galaxy/schema/schema.py b/lib/galaxy/schema/schema.py index d8aa09f0769e..5878cc8c4341 100644 --- a/lib/galaxy/schema/schema.py +++ b/lib/galaxy/schema/schema.py @@ -999,9 +999,10 @@ class CreateNewCollectionPayload(Model): default=None, description="The ID of the history that will contain the collection. Required if `instance_type=library`.", ) - fields: Optional[Union[str, List[Dict['str', 'str']]]] = Field( + fields_: Optional[Union[str, List[Dict['str', 'str']]]] = Field( default=[], - description="List of fields to create for this collection. Set to 'auto' to guess fields from identifiers." + description="List of fields to create for this collection. Set to 'auto' to guess fields from identifiers.", + alias="fields", ) diff --git a/lib/galaxy/webapps/galaxy/services/dataset_collections.py b/lib/galaxy/webapps/galaxy/services/dataset_collections.py index acf07110c007..d1f0887e53de 100644 --- a/lib/galaxy/webapps/galaxy/services/dataset_collections.py +++ b/lib/galaxy/webapps/galaxy/services/dataset_collections.py @@ -119,7 +119,7 @@ def create(self, trans: ProvidesHistoryContext, payload: CreateNewCollectionPayl :returns: element view of new dataset collection """ # TODO: Error handling... - create_params = api_payload_to_create_params(payload.dict(exclude_unset=True)) + create_params = api_payload_to_create_params(payload.dict(exclude_unset=True, by_alias=True)) if payload.instance_type == DatasetCollectionInstanceType.history: if payload.history_id is None: raise exceptions.RequestParameterInvalidException("Parameter history_id is required.")