fix task_id extraction for missing extra

Related: https://pagure.io/koji/issue/3906
This commit is contained in:
Tomas Kopecek 2023-10-31 11:27:32 +01:00
parent 7f177a0478
commit 4f78acca12

View file

@ -984,5 +984,7 @@ def extract_build_task(binfo):
task_id = binfo.get('task_id')
if task_id is None:
# legacy OSBS task id location
task_id = binfo.get('extra', {}).get('container_koji_task_id')
extra = binfo.get('extra')
if extra is not None:
task_id = extra.get('container_koji_task_id')
return task_id