|
|
@ -37,7 +37,6 @@ import org.thingsboard.server.common.data.relation.EntityRelation; |
|
|
import org.thingsboard.server.common.data.relation.EntityRelationInfo; |
|
|
import org.thingsboard.server.common.data.relation.EntityRelationInfo; |
|
|
import org.thingsboard.server.common.data.relation.EntityRelationsQuery; |
|
|
import org.thingsboard.server.common.data.relation.EntityRelationsQuery; |
|
|
import org.thingsboard.server.common.data.relation.RelationTypeGroup; |
|
|
import org.thingsboard.server.common.data.relation.RelationTypeGroup; |
|
|
import org.thingsboard.server.dao.service.ConstraintValidator; |
|
|
|
|
|
import org.thingsboard.server.queue.util.TbCoreComponent; |
|
|
import org.thingsboard.server.queue.util.TbCoreComponent; |
|
|
import org.thingsboard.server.service.security.permission.Operation; |
|
|
import org.thingsboard.server.service.security.permission.Operation; |
|
|
|
|
|
|
|
|
@ -85,7 +84,6 @@ public class EntityRelationController extends BaseController { |
|
|
if (relation.getTypeGroup() == null) { |
|
|
if (relation.getTypeGroup() == null) { |
|
|
relation.setTypeGroup(RelationTypeGroup.COMMON); |
|
|
relation.setTypeGroup(RelationTypeGroup.COMMON); |
|
|
} |
|
|
} |
|
|
ConstraintValidator.validateFields(relation); |
|
|
|
|
|
relationService.saveRelation(getTenantId(), relation); |
|
|
relationService.saveRelation(getTenantId(), relation); |
|
|
|
|
|
|
|
|
logEntityAction(relation.getFrom(), null, getCurrentUser().getCustomerId(), |
|
|
logEntityAction(relation.getFrom(), null, getCurrentUser().getCustomerId(), |
|
|
|