add context
CodeQL checks / Detect whether code changed (push) Waiting to run Details
CodeQL checks / Analyze (actions) (push) Blocked by required conditions Details
CodeQL checks / Analyze (go) (push) Blocked by required conditions Details
CodeQL checks / Analyze (javascript) (push) Blocked by required conditions Details

This commit is contained in:
Haris Rozajac 2025-10-06 14:49:13 -06:00
parent 9594276207
commit a2c7361750
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
package schemaversion package schemaversion
import "context"
// V12 migrates template variables to update their refresh and hide properties. // V12 migrates template variables to update their refresh and hide properties.
// This migration ensures that: // This migration ensures that:
// 1. Variables with refresh=true get refresh=1, and variables with refresh=false get refresh=0 // 1. Variables with refresh=true get refresh=1, and variables with refresh=false get refresh=0
@ -23,7 +25,7 @@ package schemaversion
// { "type": "query", "name": "var2", "refresh": 0, "hide": 1 } // { "type": "query", "name": "var2", "refresh": 0, "hide": 1 }
// ] // ]
// } // }
func V12(dashboard map[string]interface{}) error { func V12(_ context.Context, dashboard map[string]interface{}) error {
dashboard["schemaVersion"] = 12 dashboard["schemaVersion"] = 12
templating, ok := dashboard["templating"].(map[string]interface{}) templating, ok := dashboard["templating"].(map[string]interface{})