Portrait reservation fix?

This commit is contained in:
2026-05-12 17:36:19 +02:00
parent 838d632a28
commit 53cb1e6996
3 changed files with 235 additions and 2 deletions
+15 -2
View File
@@ -1169,6 +1169,10 @@ func nativeDatasetSourceDir(dataset nativeDataset) string {
}
func collectReferencedLockKeysFromValue(value any, referenced map[string]struct{}) {
collectReferencedLockKeysFromValueWithExpansion(value, referenced, false)
}
func collectReferencedLockKeysFromValueWithExpansion(value any, referenced map[string]struct{}, inExpansionSubtree bool) {
switch typed := value.(type) {
case string:
if strings.Contains(typed, ":") {
@@ -1176,17 +1180,26 @@ func collectReferencedLockKeysFromValue(value any, referenced map[string]struct{
}
case []any:
for _, item := range typed {
collectReferencedLockKeysFromValue(item, referenced)
collectReferencedLockKeysFromValueWithExpansion(item, referenced, inExpansionSubtree)
}
case map[string]any:
_, hasValue := typed["value"]
_, hasData := typed["data"]
isExpansion := hasValue && hasData
for key, item := range typed {
if strings.Contains(key, ":") {
referenced[key] = struct{}{}
}
if key == "key" {
if inExpansionSubtree {
if s, ok := item.(string); ok && strings.Contains(s, ":") {
referenced[s] = struct{}{}
}
}
continue
}
collectReferencedLockKeysFromValue(item, referenced)
collectReferencedLockKeysFromValueWithExpansion(item, referenced, inExpansionSubtree || isExpansion)
}
}
}