Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/controller/contactgroupmembership_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (r *ContactGroupMembershipController) Reconcile(ctx context.Context, req ct
}

// Set Status.Username based on Contact.Spec.SubjectRef.Kind
if contact.Spec.SubjectRef.Kind == "User" {
if contact.Spec.SubjectRef != nil && contact.Spec.SubjectRef.Kind == "User" {
contactGroupMembership.Status.Username = contact.Spec.SubjectRef.Name
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (r *ContactGroupMembershipRemovalController) Reconcile(ctx context.Context,
}

// Set Status.Username based on Contact.Spec.SubjectRef.Kind
if contact.Spec.SubjectRef.Kind == "User" {
if contact.Spec.SubjectRef != nil && contact.Spec.SubjectRef.Kind == "User" {
cgmr.Status.Username = contact.Spec.SubjectRef.Name
}

Expand Down