diff --git a/backend/src/main/java/ai/verta/modeldb/versioning/RepositoryDAORdbImpl.java b/backend/src/main/java/ai/verta/modeldb/versioning/RepositoryDAORdbImpl.java index e763ea7603..58ae083c87 100644 --- a/backend/src/main/java/ai/verta/modeldb/versioning/RepositoryDAORdbImpl.java +++ b/backend/src/main/java/ai/verta/modeldb/versioning/RepositoryDAORdbImpl.java @@ -4,7 +4,7 @@ import ai.verta.common.KeyValueQuery; import ai.verta.common.ModelDBResourceEnum.ModelDBServiceResourceTypes; -import ai.verta.modeldb.*; +import ai.verta.modeldb.AddDatasetTags; import ai.verta.modeldb.Dataset; import ai.verta.modeldb.DatasetVisibilityEnum; import ai.verta.modeldb.FindDatasets; @@ -18,8 +18,12 @@ import ai.verta.modeldb.common.exceptions.ModelDBException; import ai.verta.modeldb.dto.DatasetPaginationDTO; import ai.verta.modeldb.entities.AttributeEntity; -import ai.verta.modeldb.entities.versioning.*; +import ai.verta.modeldb.entities.versioning.BranchEntity; +import ai.verta.modeldb.entities.versioning.CommitEntity; +import ai.verta.modeldb.entities.versioning.RepositoryEntity; +import ai.verta.modeldb.entities.versioning.RepositoryEnums; import ai.verta.modeldb.entities.versioning.RepositoryEnums.RepositoryTypeEnum; +import ai.verta.modeldb.entities.versioning.TagsEntity; import ai.verta.modeldb.experimentRun.ExperimentRunDAO; import ai.verta.modeldb.metadata.IdentificationType; import ai.verta.modeldb.metadata.MetadataDAO; @@ -478,7 +482,9 @@ private RepositoryEntity setRepository( CommonUtils.registeredBackgroundUtilsCount(); roleService.deleteEntityResourcesWithServiceUser( deletedEntityIds.stream().map(String::valueOf).collect(Collectors.toList()), - ModelDBServiceResourceTypes.REPOSITORY); + repositoryType.equals(RepositoryTypeEnum.DATASET) + ? ModelDBServiceResourceTypes.DATASET + : ModelDBServiceResourceTypes.REPOSITORY); } finally { CommonUtils.unregisteredBackgroundUtilsCount(); }