Skip to content
Snippets Groups Projects
Commit 1e70022f authored by ld0's avatar ld0
Browse files

Use model instead of tab captions for profile creation validation

parent 650144da
Branches previewPageTabBody
No related tags found
1 merge request!8ProfileName validations
......@@ -692,9 +692,8 @@ public class ProfileView extends Panel implements View, NewProfileNameListener {
@Override
public boolean isValidName(String name) {
if (name != null && !name.isEmpty()) {
for (Component component : tabs) {
Tab tab = tabs.getTab(component);
if (tab.getCaption().equals(name)) {
for (Profile profile : currentUser.getProfiles()) {
if (profile.getProfileName().equals(name)) {
return false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment