diff --git a/fedora_distro_aliases/__init__.py b/fedora_distro_aliases/__init__.py index d6c58b1..c943088 100644 --- a/fedora_distro_aliases/__init__.py +++ b/fedora_distro_aliases/__init__.py @@ -79,7 +79,9 @@ def from_bodhi_release(cls, release): Create a `Distro` object from Bodhi `release` """ keys = ["name", "long_name", "version", "state", "branch", "id_prefix"] - return cls({k: getattr(release, k) for k in keys}) + distro = cls({k: getattr(release, k) for k in keys}) + distro.version_number = distro.version + return distro @property def product(self): diff --git a/tests/test_fedora_distro_aliases.py b/tests/test_fedora_distro_aliases.py index 56f3240..6256bd1 100644 --- a/tests/test_fedora_distro_aliases.py +++ b/tests/test_fedora_distro_aliases.py @@ -40,6 +40,7 @@ def test_distro(): assert distro.namever == "foo-123" assert distro.product == "fedora" assert distro.product == "fedora" + assert distro.version_number == "123" assert "nonsense" not in distro assert "additional" not in distro