Skip to content

Commit 0116227

Browse files
1t5j0ypetmongrels
authored andcommitted
#724 | Ignore case while checking for matching address level titles during create/update
1 parent 1f2e1e0 commit 0116227

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

avni-server-api/src/main/java/org/avni/server/domain/AddressLevel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public boolean containsSubLocation(String title, AddressLevelType type) {
126126
return null !=
127127
subLocations
128128
.stream()
129-
.filter(location -> location.getTitle().equals(title) &&
129+
.filter(location -> location.getTitle().equalsIgnoreCase(title) &&
130130
location.getType().equals(type)
131131
).findFirst()
132132
.orElse(null);
@@ -137,7 +137,7 @@ public boolean containsSubLocationExcept(String title, AddressLevelType type, Ad
137137
subLocations
138138
.stream()
139139
.filter(location -> !location.getId().equals(exclude.getId()))
140-
.filter(location -> location.getTitle().equals(title) &&
140+
.filter(location -> location.getTitle().equalsIgnoreCase(title) &&
141141
location.getType().equals(type)
142142
).findFirst()
143143
.orElse(null);

0 commit comments

Comments
 (0)