Skip to content

Commit

Permalink
remove duplicate SrcValue
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Nov 1, 2022
1 parent 7e6063d commit 6699080
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions graphql2/graphqlapp/messagelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,10 @@ func (q *Query) MessageLogs(ctx context.Context, opts *graphql2.MessageLogSearch
if log.AlertID != 0 {
dm.AlertID = &log.AlertID
}

// set provider and src
if log.ProviderMsgID != nil {
dm.ProviderID = &log.ProviderMsgID.ExternalID
}
if log.SrcValue != "" {
src, err := q.formatDest(ctx, notification.Dest{Type: dest.Type, Value: log.SrcValue})
if err != nil {
return nil, fmt.Errorf("format src: %w", err)
}
dm.Source = &src
}

conn.Nodes = append(conn.Nodes, dm)
}

Expand Down

0 comments on commit 6699080

Please sign in to comment.