Skip to content

Commit

Permalink
refactor: remove unnecessary checks for empty shifts in user and shif…
Browse files Browse the repository at this point in the history
…t trimming functions
  • Loading branch information
mastercactapus committed Dec 17, 2024
1 parent fb7a782 commit fdad66d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions engine/cleanupmanager/scheddata.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ func trimInvalidUsers(data *schedule.Data, validUsers []uuid.UUID) (changed bool
}
cleanShifts = append(cleanShifts, shift)
}
if len(cleanShifts) == 0 {
changed = true
continue
}
temp.Shifts = cleanShifts
newTempSched = append(newTempSched, temp)
}
Expand Down Expand Up @@ -138,10 +134,6 @@ func trimExpiredShifts(data *schedule.Data, cutoff time.Time) (changed bool, use

users = append(users, id)
}
if len(cleanShifts) == 0 {
changed = true
continue
}
sched.Shifts = cleanShifts
newTempSched = append(newTempSched, sched)
}
Expand Down

0 comments on commit fdad66d

Please sign in to comment.