From 26262aab536c581f7f6db3a3342642bc36f08529 Mon Sep 17 00:00:00 2001 From: hellozo0 Date: Wed, 17 Jan 2024 05:07:53 +0900 Subject: [PATCH] =?UTF-8?q?#143=20[fix]=200=EA=B3=BC=20=EB=8B=A4=EB=A5=B8?= =?UTF-8?q?=20=EA=B0=92=EC=9D=B4=20=EA=B0=99=EC=9D=B4=20=EC=9E=88=EC=9D=84?= =?UTF-8?q?=EB=95=8C=20false?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../validation/prefer_regions/PreferRegionsValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/moddy/server/common/validation/prefer_regions/PreferRegionsValidator.java b/src/main/java/com/moddy/server/common/validation/prefer_regions/PreferRegionsValidator.java index 8ff318f0..686229f2 100644 --- a/src/main/java/com/moddy/server/common/validation/prefer_regions/PreferRegionsValidator.java +++ b/src/main/java/com/moddy/server/common/validation/prefer_regions/PreferRegionsValidator.java @@ -17,7 +17,7 @@ public boolean isValid(List preferRegions, ConstraintValidatorContext cont if (preferRegions == null || preferRegions.isEmpty()) return false; if (preferRegions.size() != new HashSet<>(preferRegions).size()) return false; - if (preferRegions.stream().filter(p -> p == 0).count() <= 1 && preferRegions.stream().anyMatch(p -> p != 0)) return false; + if (preferRegions.stream().filter(p -> p == 0).count() == 1 && preferRegions.stream().anyMatch(p -> p != 0)) return false; if (!preferRegions.stream().allMatch(p -> p >= 0 && p <= 25)) return false; if (preferRegions.size() > 3 ) return false;