Skip to content

Commit

Permalink
ensure upid nonempty
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Nov 18, 2024
1 parent 5fbf3ad commit 73c9ed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/store/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (store *Store) GetJob(id string) (*Job, error) {
job.Exclusions = exclusions
}

if job.LastRunUpid != nil {
if job.LastRunUpid != nil && *job.LastRunUpid != "" {
task, err := store.GetTaskByUPID(*job.LastRunUpid)
if err != nil {
log.Printf("GetJob: error getting task by UPID -> %v\n", err)
Expand Down Expand Up @@ -335,7 +335,7 @@ func (store *Store) GetAllJobs() ([]Job, error) {
job.Exclusions = exclusions
}

if job.LastRunUpid != nil {
if job.LastRunUpid != nil && *job.LastRunUpid != "" {
task, err := store.GetTaskByUPID(*job.LastRunUpid)
if err != nil {
log.Printf("GetJob: error getting task by UPID -> %v\n", err)
Expand Down

0 comments on commit 73c9ed7

Please sign in to comment.