Skip to content

Commit

Permalink
Name should be quoted before hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
mohityadav766 committed Aug 24, 2023
1 parent a792c40 commit 00d6acc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.jdbi.v3.core.Handle;
import org.openmetadata.schema.EntityInterface;
import org.openmetadata.schema.entity.teams.User;
import org.openmetadata.schema.tests.TestSuite;
import org.openmetadata.schema.type.Include;
import org.openmetadata.schema.utils.EntityInterfaceUtil;
import org.openmetadata.service.jdbi3.CollectionDAO;
import org.openmetadata.service.jdbi3.ListFilter;
import org.openmetadata.service.jdbi3.TestSuiteRepository;
Expand Down Expand Up @@ -70,7 +72,7 @@ public static void lowerCaseUserNameAndEmail(CollectionDAO daoCollection) {
List<String> userEntities = daoCollection.userDAO().listAfterWithOffset(limit, offset);
for (String json : userEntities) {
User userEntity = JsonUtils.readValue(json, User.class);
userEntity.setFullyQualifiedName(userEntity.getFullyQualifiedName().toLowerCase());
userEntity.setFullyQualifiedName(EntityInterfaceUtil.quoteName(userEntity.getFullyQualifiedName().toLowerCase()));
daoCollection.userDAO().update(userEntity);
}
offset = offset + limit;
Expand Down

0 comments on commit 00d6acc

Please sign in to comment.