Skip to content

Commit

Permalink
fix read notice cause panic (#4930)
Browse files Browse the repository at this point in the history
  • Loading branch information
bxy4543 authored Jul 30, 2024
1 parent 1d82b3f commit 73c3919
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/account/controllers/debt_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@ func (r *DebtReconciler) readNotice(ctx context.Context, namespaces []string, no
} else if err != nil {
continue
}
if ntf.Labels != nil && ntf.Labels[readStatusLabel] == trueStatus {
if ntf.Labels == nil {
ntf.Labels = make(map[string]string)
} else if ntf.Labels[readStatusLabel] == trueStatus {
continue
}
ntf.Labels[readStatusLabel] = trueStatus
Expand Down

0 comments on commit 73c3919

Please sign in to comment.