thingsboard-aplcache

Merge pull request #248 from ssmaurya/master Fix for error

8/17/2017 9:28:17 AM

Details

diff --git a/dao/src/main/java/org/thingsboard/server/dao/customer/CustomerServiceImpl.java b/dao/src/main/java/org/thingsboard/server/dao/customer/CustomerServiceImpl.java
index 4973d9e..d7dde12 100644
--- a/dao/src/main/java/org/thingsboard/server/dao/customer/CustomerServiceImpl.java
+++ b/dao/src/main/java/org/thingsboard/server/dao/customer/CustomerServiceImpl.java
@@ -154,7 +154,7 @@ public class CustomerServiceImpl extends AbstractEntityService implements Custom
                 protected void validateUpdate(Customer customer) {
                     customerDao.findCustomersByTenantIdAndTitle(customer.getTenantId().getId(), customer.getTitle()).ifPresent(
                             c -> {
-                                if (!c.getId().equals(customer.getUuidId())) {
+                                if (!c.getId().equals(customer.getId())) {
                                     throw new DataValidationException("Customer with such title already exists!");
                                 }
                             }