Skip to content

Commit

Permalink
Don't fail if the scratch field doesn't exist
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Srb <[email protected]>
  • Loading branch information
msrb committed Nov 10, 2023
1 parent 9237cb6 commit 70c9751
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/org/fedoraproject/jenkins/koji/Koji.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ class Koji implements Serializable {
taskInfo.ownerId = result.get('owner')

taskInfo.target = result.get('request')[1]
taskInfo.scratch = result.get('request')[2].get('scratch', false)
taskInfo.scratch = false
def options = result.get('request')[2]
if (options && options instanceof Map) {
taskInfo.scratch = options.get('scratch', false)
}

if (build != null) {
// TODO: find a better way how to do this "delegation" in Groovy (inheritance:))
Expand Down

0 comments on commit 70c9751

Please sign in to comment.