fix: buildSnapshot 放宽有效性检查,页面/规则任一有效即可,不再强制要求脚本
修复场景:仅编辑页面配置时,站点可能尚无脚本,导致保存预览版失败、发布按钮不出现
This commit is contained in:
@@ -112,7 +112,9 @@ public class SiteSnapshotServiceImpl implements SiteSnapshotService {
|
||||
}
|
||||
}
|
||||
|
||||
return snapshot.containsKey("script") ? snapshot : null;
|
||||
// 只要有任一配置(脚本/页面/规则)即视为有效快照
|
||||
return (!snapshot.containsKey("script") && !snapshot.containsKey("pages") && !snapshot.containsKey("riskRules"))
|
||||
? null : snapshot;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user