Skip to content

Commit

Permalink
Merge pull request #18207 from mvdbeek/fix_genome_build_int
Browse files Browse the repository at this point in the history
[24.0] Add string cast for dbkey / genome_build
  • Loading branch information
mvdbeek authored May 23, 2024
2 parents 154aaa1 + ccec683 commit 921f181
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/managers/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ def add_serializers(self):
# 'extended_metadata': self.serialize_extended_metadata,
# 'extended_metadata_id': self.serialize_id,
# remapped
"genome_build": lambda item, key, **context: item.dbkey,
# TODO: Replace string cast with https://github.com/pydantic/pydantic/pull/9137 on 24.1
"genome_build": lambda item, key, **context: str(item.dbkey) if item.dbkey is not None else None,
# derived (not mapped) attributes
"data_type": lambda item, key, **context: f"{item.datatype.__class__.__module__}.{item.datatype.__class__.__name__}",
"converted": self.serialize_converted_datasets,
Expand Down

0 comments on commit 921f181

Please sign in to comment.