mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 10:38:00 +01:00
fix nil map assignment in gc handler (#14918)
Signed-off-by: Eike David Lenz <e.lenz@mittwald.de>
This commit is contained in:
parent
80541126e6
commit
a3e27ebb87
@ -63,6 +63,9 @@ func (g *gcAPI) UpdateGCSchedule(ctx context.Context, params operation.UpdateGCS
|
||||
}
|
||||
|
||||
func (g *gcAPI) kick(ctx context.Context, scheType string, cron string, parameters map[string]interface{}) (int64, error) {
|
||||
if parameters == nil {
|
||||
parameters = make(map[string]interface{})
|
||||
}
|
||||
// set the required parameters for GC
|
||||
parameters["redis_url_reg"] = os.Getenv("_REDIS_URL_REG")
|
||||
parameters["time_window"] = config.GetGCTimeWindow()
|
||||
|
Loading…
Reference in New Issue
Block a user