fix(migrate): create properties when nil

This commit is contained in:
Jan De Dobbeleer 2024-11-08 16:21:17 +01:00 committed by Jan De Dobbeleer
parent f838eaf00a
commit 84e1e898f4

View file

@ -28,6 +28,10 @@ func (segment *Segment) migrate(version int) {
return
}
if segment.Properties == nil {
segment.Properties = properties.Map{}
}
// Cache settings, the default is now 24h so we have to respect this being disabled previously
if !segment.Properties.GetBool("cache_version", false) {
segment.Properties[properties.CacheDuration] = cache.NONE