Skip to content

Commit

Permalink
copy the status field
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis committed Jan 9, 2025
1 parent 970d73f commit 5a5498a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/auth/usertasks/usertasksv1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package usertasksv1

import (
"cmp"
"context"
"log/slog"
"time"
Expand Down Expand Up @@ -353,7 +354,7 @@ func (s *Service) updateStatus(ut *usertasksv1.UserTask, existing *usertasksv1.U

if existing != nil {
// Inherit everything from existing UserTask.
ut.Status = existing.Status
ut.Status.LastStateChange = cmp.Or(existing.Status.LastStateChange, ut.Status.LastStateChange)

// Update specific values.
if existing.GetSpec().GetState() != ut.GetSpec().GetState() {
Expand Down

0 comments on commit 5a5498a

Please sign in to comment.