Skip to content

Commit

Permalink
WTEL-3991
Browse files Browse the repository at this point in the history
  • Loading branch information
navrotskyj committed Nov 7, 2023
1 parent 674a152 commit 3e8c4c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions queue/attempt.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,11 @@ func (a *Attempt) DistributeAgent(agent agent_manager.AgentObject) {
wlog.Debug(fmt.Sprintf("attempt[%d] distribute agent %d", a.Id(), agent.Id()))
}

func (a *Attempt) TeamUpdatedAt() *int64 {
return a.member.TeamUpdatedAt
func (a *Attempt) TeamUpdatedAt() int64 {
if a.member.TeamUpdatedAt == nil {
return 0
}
return *a.member.TeamUpdatedAt
}

func (a *Attempt) Id() int64 {
Expand Down
2 changes: 1 addition & 1 deletion queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (queue *BaseQueue) TeamManager() *teamManager {

func (queue *BaseQueue) GetTeam(attempt *Attempt) (*agentTeam, *model.AppError) {
if attempt.agent != nil {
return queue.TeamManager().GetTeam(attempt.agent.TeamId(), attempt.agent.TeamUpdatedAt())
return queue.TeamManager().GetTeam(attempt.agent.TeamId(), attempt.TeamUpdatedAt())
}

return nil, model.NewAppError("BaseQueue.GetTeam", "queue.team.get_by_id.app_error", nil, "Not found parameters", http.StatusInternalServerError)
Expand Down

0 comments on commit 3e8c4c0

Please sign in to comment.