Fix issues caused by lowercasing of the join addresses

This commit is contained in:
Risto Lahtela 2021-03-17 16:19:26 +02:00
parent ff679d626d
commit aa25f2ff07
2 changed files with 5 additions and 5 deletions

View File

@ -440,10 +440,10 @@ public class GraphJSONCreator {
}
public void translateUnknown(Map<String, Integer> joinAddresses) {
Integer unknown = joinAddresses.get("Unknown");
Integer unknown = joinAddresses.get("unknown");
if (unknown != null) {
joinAddresses.remove("Unknown");
joinAddresses.put(locale.getString(GenericLang.UNKNOWN), unknown);
joinAddresses.remove("unknown");
joinAddresses.put(locale.getString(GenericLang.UNKNOWN).toLowerCase(), unknown);
}
}
}

View File

@ -285,7 +285,7 @@ public interface UserInfoQueriesTest extends DatabaseTestPreparer {
default void joinAddressQueryHasNoNullValues() {
joinAddressCanBeNull();
Map<String, Integer> expected = Collections.singletonMap("Unknown", 1);
Map<String, Integer> expected = Collections.singletonMap("unknown", 1);
Map<String, Integer> result = db().query(UserInfoQueries.joinAddresses());
assertEquals(expected, result);
}
@ -294,7 +294,7 @@ public interface UserInfoQueriesTest extends DatabaseTestPreparer {
default void serverJoinAddressQueryHasNoNullValues() {
joinAddressCanBeNull();
Map<String, Integer> expected = Collections.singletonMap("Unknown", 1);
Map<String, Integer> expected = Collections.singletonMap("unknown", 1);
Map<String, Integer> result = db().query(UserInfoQueries.joinAddresses(serverUUID()));
assertEquals(expected, result);
}