build description common model fix

This commit is contained in:
CITE\amentis 2024-10-04 09:54:04 +03:00
parent 9c4b6f144a
commit 60b2e9cb90
1 changed files with 4 additions and 2 deletions

View File

@ -1713,7 +1713,8 @@ public class DescriptionServiceImpl implements DescriptionService {
if (commonModel.getDescriptionTemplate() != null && commonModel.getDescriptionTemplate().getDefinition() != null && !this.conventionService.isListNullOrEmpty(commonModel.getDescriptionTemplate().getDefinition().getPages())) {
if (commonModel.getProperties() != null && commonModel.getProperties().getFieldSets() != null && !commonModel.getProperties().getFieldSets().isEmpty()){
for (String fieldSetId: commonModel.getProperties().getFieldSets().keySet()){
fieldSetsMap.put(fieldSetId, this.commonModelPropertyDefinitionFieldSetToPersist(commonModel.getProperties().getFieldSets().get(fieldSetId), commonModel.getDescriptionTemplate()));
PropertyDefinitionFieldSetPersist fieldSetPersist = this.commonModelPropertyDefinitionFieldSetToPersist(commonModel.getProperties().getFieldSets().get(fieldSetId), commonModel.getDescriptionTemplate());
if (fieldSetPersist != null && !this.conventionService.isListNullOrEmpty(fieldSetPersist.getItems())) fieldSetsMap.put(fieldSetId, fieldSetPersist);
}
}
}
@ -1733,7 +1734,8 @@ public class DescriptionServiceImpl implements DescriptionService {
if (!this.conventionService.isListNullOrEmpty(commonModel.getItems())){
List<PropertyDefinitionFieldSetItemPersist> items = new ArrayList<>();
for (PropertyDefinitionFieldSetItemModel fieldSetItem: commonModel.getItems()) {
items.add(this.commonModelPropertyDefinitionFieldSetItemToPersist(fieldSetItem, descriptionTemplate));
PropertyDefinitionFieldSetItemPersist fieldSetItemPersist = this.commonModelPropertyDefinitionFieldSetItemToPersist(fieldSetItem, descriptionTemplate);
if (fieldSetItemPersist != null && !fieldSetItemPersist.getFields().isEmpty()) items.add(fieldSetItemPersist);
}
persist.setItems(items);
return persist;