Ignore change number when its not provided

It happens from time to time, especially when the periodic jobs are
executed, that there is no change number provided, so the logsender raises
an exception, due the None type can not be converted to integer.

Change-Id: I0d3de8806f9f6bc636e9c4c2f2d65ef8a8957099
This commit is contained in:
Daniel Pawlik
2024-03-15 15:32:28 +01:00
parent f430076a1b
commit 32901112e6

View File

@@ -265,7 +265,8 @@ def makeFields(build_inventory, buildinfo):
fields["build_queue"] = build_details.get("pipeline", "NONE")
fields["build_ref"] = buildinfo.get("ref")
fields["build_branch"] = build_details.get("branch")
fields["build_change"] = int(build_details.get("change"))
fields["build_change"] = int(
build_details.get("change")) if build_details.get("change") else ''
fields["build_patchset"] = build_details.get("patchset")
fields["build_newrev"] = build_details.get("newrev", '')
fields["build_uuid"] = str(buildinfo.get("uuid"))