From e476ddac71213fc5dae55c0a7c2227da42b0aab1 Mon Sep 17 00:00:00 2001 From: John Niang Date: Thu, 29 Aug 2024 12:17:25 +0800 Subject: [PATCH] Make slug of single page be not unique (#6545) #### What type of PR is this? /kind cleanup /area core /milestone 2.19.0 #### What this PR does / why we need it: For backward compatibility, the slug of single page should not be unique. BTW, the problem was introduced by . #### Does this PR introduce a user-facing change? ```release-note None ``` --- .../src/main/java/run/halo/app/infra/SchemeInitializer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/run/halo/app/infra/SchemeInitializer.java b/application/src/main/java/run/halo/app/infra/SchemeInitializer.java index eca97c4cda..fbc933e213 100644 --- a/application/src/main/java/run/halo/app/infra/SchemeInitializer.java +++ b/application/src/main/java/run/halo/app/infra/SchemeInitializer.java @@ -490,7 +490,7 @@ public void onApplicationEvent(@NonNull ApplicationContextInitializedEvent event ); is.add(new IndexSpec() .setName("spec.slug") - .setUnique(true) + .setUnique(false) .setIndexFunc( simpleAttribute(SinglePage.class, page -> Optional.ofNullable(page.getSpec()) .map(SinglePage.SinglePageSpec::getSlug)