Skip to content

Commit

Permalink
panic fix for when a empty Job is returned by the resource
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmcatee committed Sep 26, 2019
1 parent 9d8701a commit cd505e1
Show file tree
Hide file tree
Showing 3 changed files with 342 additions and 100 deletions.
9 changes: 9 additions & 0 deletions common/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,12 @@ func CopyJob(src Job, dst *Job) {
dst.OutputData = src.OutputData
dst.OutputTitles = src.OutputTitles
}

// IsEmpty returns true if the job is initialized, but has no values
func IsEmpty(j Job) bool {
if j.UUID == "" {
return true
}

return false
}
Loading

0 comments on commit cd505e1

Please sign in to comment.