From: Tony Mack Date: Tue, 29 Nov 2011 21:13:11 +0000 (-0500) Subject: cast version_num to string before comparing X-Git-Tag: sfa-2.0-1~3^2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=fe096185d3a3a5685ad87de9f81fc0df113b1988;p=sfa.git cast version_num to string before comparing --- diff --git a/sfa/rspecs/version_manager.py b/sfa/rspecs/version_manager.py index 66bad74c..caf2d23b 100644 --- a/sfa/rspecs/version_manager.py +++ b/sfa/rspecs/version_manager.py @@ -31,7 +31,7 @@ class VersionManager: retval = None for version in self.versions: if type is None or type.lower() == version.type.lower(): - if version_num is None or version_num == version.version: + if version_num is None or str(version_num) == version.version: if content_type is None or content_type.lower() == version.content_type.lower() \ or version.content_type == '*': retval = version