diff --git a/lib/galaxy/schema/schema.py b/lib/galaxy/schema/schema.py index 4d3e89d4b1d2..d121934fad25 100644 --- a/lib/galaxy/schema/schema.py +++ b/lib/galaxy/schema/schema.py @@ -998,9 +998,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.")