From 9bb7b8a7167ea8e67ff64c73e0e1bc84b02d4f52 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 15 Feb 2017 12:09:49 -0500 Subject: [PATCH] Force MMD's int version to a str when interacting with our db. --- module_build_service/utils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/module_build_service/utils.py b/module_build_service/utils.py index de595669..a11a16ea 100644 --- a/module_build_service/utils.py +++ b/module_build_service/utils.py @@ -419,9 +419,8 @@ def submit_module_build(username, url, allow_local_url = False): mmd, scm, yaml = _fetch_mmd(url, allow_local_url) - module = models.ModuleBuild.query.filter_by(name=mmd.name, - stream=mmd.stream, - version=mmd.version).first() + module = models.ModuleBuild.query.filter_by( + name=mmd.name, stream=mmd.stream, version=str(mmd.version)).first() if module: log.debug('Checking whether module build already exist.') # TODO: make this configurable, we might want to allow @@ -445,7 +444,7 @@ def submit_module_build(username, url, allow_local_url = False): conf, name=mmd.name, stream=mmd.stream, - version=mmd.version, + version=str(mmd.version), modulemd=yaml, scmurl=url, username=username