small fix
This commit is contained in:
parent
a7e6459283
commit
f8d074b81c
|
@ -817,7 +817,7 @@ public class PlanBlueprintServiceImpl implements PlanBlueprintService {
|
|||
private DescriptionTemplatePersist xmlDescriptionTemplateToPersist(BlueprintDescriptionTemplateImportExport importXml) {
|
||||
DescriptionTemplatePersist persist = new DescriptionTemplatePersist();
|
||||
|
||||
org.opencdmp.data.DescriptionTemplateEntity data = importXml.getDescriptionTemplateGroupId() != null ? this.queryFactory.query(DescriptionTemplateQuery.class).disableTracking().groupIds(importXml.getDescriptionTemplateGroupId()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._code).ensure(DescriptionTemplate._groupId).ensure(DescriptionTemplate._status)) : null;
|
||||
org.opencdmp.data.DescriptionTemplateEntity data = importXml.getDescriptionTemplateGroupId() != null ? this.queryFactory.query(DescriptionTemplateQuery.class).isActive(IsActive.Active).disableTracking().groupIds(importXml.getDescriptionTemplateGroupId()).disableTracking().firstAs(new BaseFieldSet().ensure(DescriptionTemplate._code).ensure(DescriptionTemplate._groupId).ensure(DescriptionTemplate._status)) : null;
|
||||
if (data != null ) {
|
||||
if (!data.getStatus().equals(DescriptionTemplateStatus.Finalized)) throw new MyValidationException(this.errors.getBlueprintDescriptionTemplateImportDraft().getCode(), data.getCode());
|
||||
persist.setDescriptionTemplateGroupId(importXml.getDescriptionTemplateGroupId());
|
||||
|
|
Loading…
Reference in New Issue