Project

General

Profile

Revision 2751cefc

ID2751cefc39472efe7d9d718d367cf1c987036d54
Parent fdce845e
Child 5abdc016

Added by Andreas Kohlbecker over 1 year ago

ref #8039 preserving un-persisted registrations only when not persisted meanwhile

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
229 229
                }
230 230
            }
231 231
            loadWorkingSet(workingset.getCitationUuid());
232
            for(RegistrationDTO regDto : unpersisted){
233
                try {
234
                    workingset.add(regDto);
235
                } catch (RegistrationValidationException e) {
236
                    // would never happen here //
232
            for(RegistrationDTO regDtoUnpersisted : unpersisted){
233
                if(!workingset.getRegistrationDTOs().stream().anyMatch(dto -> dto.getUuid().equals(regDtoUnpersisted.getUuid()))){
234
                    // only add if the regDtoUnpersisted has not been persisted meanwhile
235
                    try {
236
                        workingset.add(regDtoUnpersisted);
237
                    } catch (RegistrationValidationException e) {
238
                        // would never happen here //
239
                    }
237 240
                }
238 241
            }
239 242
        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)