Skip to content

Commit

Permalink
feat: 历史删除节点只查询最新一条记录 TencentBlueKing#2289
Browse files Browse the repository at this point in the history
  • Loading branch information
zacYL authored Jun 20, 2024
1 parent 527d71d commit ac52fe2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ open class NodeRestoreSupport(
override fun getDeletedNodeDetail(artifact: ArtifactInfo): List<NodeDetail> {
with(artifact) {
val query = nodeDeletedPointListQuery(projectId, repoName, getArtifactFullPath())
return nodeDao.find(query).map { convertToDetail(it)!! }
val deletedNode = nodeDao.findOne(query)
return if (deletedNode == null) {
emptyList()
} else {
listOf(convertToDetail(deletedNode)!!)
}
}
}

Expand Down

0 comments on commit ac52fe2

Please sign in to comment.