Skip to content

Commit

Permalink
fix(overview): init team locks map if not already (#1892)
Browse files Browse the repository at this point in the history
Ref: SRX-QMIIYB
  • Loading branch information
miguel-crespo-fdc authored Aug 16, 2024
1 parent 02b43b2 commit facab1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/db/overview.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func (h *DBHandler) UpdateOverviewTeamLock(ctx context.Context, transaction *sql
}
apps := getEnvironmentApplicationsByTeam(env.Applications, teamLock.Team)
for _, app := range apps {
if app.Locks == nil {
app.Locks = map[string]*api.Lock{}
if app.TeamLocks == nil {
app.TeamLocks = map[string]*api.Lock{}
}
app.TeamLocks[teamLock.LockID] = &api.Lock{
Message: teamLock.Metadata.Message,
Expand Down

0 comments on commit facab1f

Please sign in to comment.