Skip to content

Commit

Permalink
Remove workaround for unloading of project parent
Browse files Browse the repository at this point in the history
Fields are no longer unloaded when a transaction commits (`DataNucleus.RetainValues` is enabled globally), as of stevespringett/Alpine#552.

Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Dec 8, 2024
1 parent 1ddb937 commit 0c0d247
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,6 @@ public Project updateProject(Project transientProject, boolean commitIndex) {
} else {
project.setCollectionTag(null);
}
// Force loading parent. This seems useless but somehow the code block above magically unloads the parent,
// making it missing in the API response. Following line enforces it to be available again.
// For reference see following Unit Test which would fail without this:
// org.dependencytrack.resources.v1.ProjectResourceTest.patchProjectParentTest
project.getParent();

return persist(project);
});
Expand Down

0 comments on commit 0c0d247

Please sign in to comment.