small fix

This commit is contained in:
CITE\amentis 2024-09-06 17:09:04 +03:00
parent a7e6459283
commit f8d074b81c
1 changed files with 1 additions and 1 deletions

View File

@ -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());