if (this.adminHelper.getContact() instanceof Contact) {
// Link customer
updatedCustomer = this.adminCustomerBean.linkCustomer(customer);
+
+ // Remove contact instance
+ this.adminHelper.setContact(null);
} else {
// Add new customer instance
updatedCustomer = this.adminCustomerBean.addCustomer(customer);
if (this.adminHelper.getContact() instanceof Contact) {
// Link contact with this user
updatedUser = this.userBean.linkUser(user);
+
+ // Remove contact instance
+ this.adminHelper.setContact(null);
} else {
// Add new contact
updatedUser = this.userBean.addUser(user);