Skip to content

Commit dd28cba

Browse files
committed
refactor
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent f384872 commit dd28cba

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDao.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,5 @@ public interface VMTemplateDao extends GenericDao<VMTemplateVO, Long>, StateDao<
100100

101101
List<Long> listIdsByTemplateTag(String tag);
102102

103-
List<Long> listByUserdataIdsNotAccount(List<Long> userdataIds, long accountId);
103+
List<Long> listByUserdataIdsNotBelongingToAccount(List<Long> userdataIds, long accountId);
104104
}

engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ public boolean updateState(
865865
}
866866

867867
@Override
868-
public List<Long> listByUserdataIdsNotAccount(List<Long> userdataIds, long accountId) {
868+
public List<Long> listByUserdataIdsNotBelongingToAccount(List<Long> userdataIds, long accountId) {
869869
if (CollectionUtils.isEmpty(userdataIds)) {
870870
return Collections.emptyList();
871871
}

server/src/main/java/com/cloud/user/AccountManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ protected void deleteUserDataForAccount(long accountId) {
480480
if (CollectionUtils.isEmpty(userdataIdsList)) {
481481
return;
482482
}
483-
List<Long> conflictingTemplateIds = _templateDao.listByUserdataIdsNotAccount(userdataIdsList, accountId);
483+
List<Long> conflictingTemplateIds = _templateDao.listByUserdataIdsNotBelongingToAccount(userdataIdsList, accountId);
484484
if (CollectionUtils.isNotEmpty(conflictingTemplateIds)) {
485485
logger.warn("User data IDs {} owned by account ID {} cannot be deleted as some of them are " +
486486
"linked to templates {} not owned by the account.", userdataIdsList, accountId,

0 commit comments

Comments
 (0)