mirror of
https://github.com/DependencyTrack/dependency-track.git
synced 2025-11-10 02:21:07 +00:00
Merge pull request #4415 from nscuro/issue-4410
This commit is contained in:
commit
9b015c3e28
16 changed files with 157 additions and 65 deletions
|
|
@ -182,7 +182,7 @@ final class ProjectQueryManager extends QueryManager implements IQueryManager {
|
|||
public List<Project> getAllProjects(boolean excludeInactive) {
|
||||
final Query<Project> query = pm.newQuery(Project.class);
|
||||
if (excludeInactive) {
|
||||
query.setFilter("active == true || active == null");
|
||||
query.setFilter("active");
|
||||
}
|
||||
query.setOrdering("id asc");
|
||||
return query.executeList();
|
||||
|
|
@ -473,9 +473,6 @@ final class ProjectQueryManager extends QueryManager implements IQueryManager {
|
|||
if (project.getParent() != null && !Boolean.TRUE.equals(project.getParent().isActive())){
|
||||
throw new IllegalArgumentException("An inactive Parent cannot be selected as parent");
|
||||
}
|
||||
if (project.isActive() == null) {
|
||||
project.setActive(Boolean.TRUE);
|
||||
}
|
||||
final Project oldLatestProject = project.isLatest() ? getLatestProjectVersion(project.getName()) : null;
|
||||
final Project result = callInTransaction(() -> {
|
||||
// Remove isLatest flag from current latest project version, if the new project will be the latest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue