#998 Cast 'version' in get_build_from_nsvc to str.
Merged a year ago by jkaluza. Opened a year ago by jkaluza.
jkaluza/fm-orchestrator cast-version  into  master

@@ -297,7 +297,7 @@ 

          filter_by method.

          """

          return session.query(ModuleBuild).filter_by(

-             name=name, stream=stream, version=version, context=context, **kwargs).first()

+             name=name, stream=stream, version=str(version), context=context, **kwargs).first()

  

      def mmd(self):

          try:

If we pass version as int to SQLAlchemy and PostgreSQL is used, the SQLAlchemy throws an (ProgrammingError) operator does not exist: character varying = bigint exception. The reason is that ModuleBuild.version is string in our DB schema, but Modulemd.get_version() returns int.

This PR fixes that by casting version to str everytime in get_build_from_nsvc(...).

Pull-Request has been merged by jkaluza

a year ago