fix bugg
This commit is contained in:
parent
7646fd8dae
commit
133562a061
|
@ -343,7 +343,7 @@ public class DmpServiceImpl implements DmpService {
|
||||||
.groupIds(data.getGroupId());
|
.groupIds(data.getGroupId());
|
||||||
|
|
||||||
dmpQuery.setOrder(new Ordering().addDescending(Dmp._version));
|
dmpQuery.setOrder(new Ordering().addDescending(Dmp._version));
|
||||||
previousDmp = dmpQuery.collect().get(0);
|
previousDmp = dmpQuery.count() > 0 ? dmpQuery.collect().get(0) : null;
|
||||||
if (previousDmp != null){
|
if (previousDmp != null){
|
||||||
if (previousDmp.getStatus().equals(DmpStatus.Finalized)) previousDmp.setVersionStatus(DmpVersionStatus.Current);
|
if (previousDmp.getStatus().equals(DmpStatus.Finalized)) previousDmp.setVersionStatus(DmpVersionStatus.Current);
|
||||||
else previousDmp.setVersionStatus(DmpVersionStatus.NotFinalized);
|
else previousDmp.setVersionStatus(DmpVersionStatus.NotFinalized);
|
||||||
|
@ -1101,7 +1101,7 @@ public class DmpServiceImpl implements DmpService {
|
||||||
.groupIds(dmp.getGroupId());
|
.groupIds(dmp.getGroupId());
|
||||||
|
|
||||||
dmpQuery.setOrder(new Ordering().addDescending(Dmp._version));
|
dmpQuery.setOrder(new Ordering().addDescending(Dmp._version));
|
||||||
DmpEntity previousDmp = dmpQuery.collect().get(0);
|
DmpEntity previousDmp = dmpQuery.count() > 0 ? dmpQuery.collect().get(0) : null;
|
||||||
if (previousDmp != null){
|
if (previousDmp != null){
|
||||||
if (previousDmp.getStatus().equals(DmpStatus.Finalized)) previousDmp.setVersionStatus(DmpVersionStatus.Current);
|
if (previousDmp.getStatus().equals(DmpStatus.Finalized)) previousDmp.setVersionStatus(DmpVersionStatus.Current);
|
||||||
else previousDmp.setVersionStatus(DmpVersionStatus.NotFinalized);
|
else previousDmp.setVersionStatus(DmpVersionStatus.NotFinalized);
|
||||||
|
|
Loading…
Reference in New Issue