Skip to content

Commit 2b3e8d4

Browse files
#1154 - Forcing detach of projects prior to serialization
1 parent 91466e4 commit 2b3e8d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/dependencytrack/resources/v1/VulnerabilityResource.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public Response getAffectedProject(@PathParam("source") String source,
195195
try (QueryManager qm = new QueryManager(getAlpineRequest())) {
196196
final Vulnerability vulnerability = qm.getVulnerabilityByVulnId(source, vuln);
197197
if (vulnerability != null) {
198-
final List<Project> projects = qm.getProjects(vulnerability);
198+
final List<Project> projects = qm.detach(qm.getProjects(vulnerability));
199199
final long totalCount = projects.size();
200200
return Response.ok(projects).header(TOTAL_COUNT_HEADER, totalCount).build();
201201
} else {

0 commit comments

Comments
 (0)