mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 06:19:03 +08:00
fix: nil pointer dereference for empty payload (#5680)
This commit is contained in:
parent
0dca1237b9
commit
7811fdd17a
@ -446,13 +446,15 @@ func (c *CompositeQuery) EnabledQueries() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *CompositeQuery) Sanitize() {
|
func (c *CompositeQuery) Sanitize() {
|
||||||
|
if c == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
// remove groupBy for queries with list panel type
|
// remove groupBy for queries with list panel type
|
||||||
for _, query := range c.BuilderQueries {
|
for _, query := range c.BuilderQueries {
|
||||||
if len(query.GroupBy) > 0 && c.PanelType == PanelTypeList {
|
if len(query.GroupBy) > 0 && c.PanelType == PanelTypeList {
|
||||||
query.GroupBy = []AttributeKey{}
|
query.GroupBy = []AttributeKey{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CompositeQuery) Validate() error {
|
func (c *CompositeQuery) Validate() error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user