Browse Source
Merge pull request #12894 from AndriiLandiak/fix-calculated-field-vc
Fix method getEntityDataInfo in VersionController
pull/12912/head
Viacheslav Klimov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
2 additions and
2 deletions
-
application/src/main/java/org/thingsboard/server/service/sync/vc/DefaultEntitiesVersionControlService.java
-
common/data/src/main/java/org/thingsboard/server/common/data/sync/vc/EntityDataInfo.java
|
|
@ -500,10 +500,9 @@ public class DefaultEntitiesVersionControlService implements EntitiesVersionCont |
|
|
@Override |
|
|
@Override |
|
|
public ListenableFuture<EntityDataInfo> getEntityDataInfo(User user, EntityId entityId, String versionId) { |
|
|
public ListenableFuture<EntityDataInfo> getEntityDataInfo(User user, EntityId entityId, String versionId) { |
|
|
return Futures.transform(gitServiceQueue.getEntity(user.getTenantId(), versionId, entityId), |
|
|
return Futures.transform(gitServiceQueue.getEntity(user.getTenantId(), versionId, entityId), |
|
|
entity -> new EntityDataInfo(entity.hasRelations(), entity.hasAttributes(), entity.hasCredentials()), MoreExecutors.directExecutor()); |
|
|
entity -> new EntityDataInfo(entity.hasRelations(), entity.hasAttributes(), entity.hasCredentials(), entity.hasCalculatedFields()), MoreExecutors.directExecutor()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public ListenableFuture<List<BranchInfo>> listBranches(TenantId tenantId) { |
|
|
public ListenableFuture<List<BranchInfo>> listBranches(TenantId tenantId) { |
|
|
return gitServiceQueue.listBranches(tenantId); |
|
|
return gitServiceQueue.listBranches(tenantId); |
|
|
|
|
|
@ -26,4 +26,5 @@ public class EntityDataInfo { |
|
|
boolean hasRelations; |
|
|
boolean hasRelations; |
|
|
boolean hasAttributes; |
|
|
boolean hasAttributes; |
|
|
boolean hasCredentials; |
|
|
boolean hasCredentials; |
|
|
|
|
|
boolean hasCalculatedFields; |
|
|
} |
|
|
} |
|
|
|