Project

General

Profile

« Previous | Next » 

Revision 370fff82

Added by Andreas Kohlbecker about 5 years ago

ref #8031 proper creation of empty registration workingsets in loadWorkingSetByReferenceUuid

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/registration/IRegistrationWorkingSetService.java
60 60
    public RegistrationWorkingSet loadWorkingSetByReferenceID(Integer referenceID, boolean resolveSections) throws RegistrationValidationException;
61 61

  
62 62
    /**
63
     * @param referenceID
63
     * Loads the working set specified by the <code>referenceUuid</code> from the database. The list of {@link RegistrationDTO}s can be empty in case
64
     * there is no registration which is related to the reference.
65
     *
66
     * @param referenceUuid
64 67
     * @param resolveSections resolve the higher publication unit and build the RegistrationWorkingSet for that reference. E.e. For journal sections the
65 68
     *  use the inReference which is the journal article.
66 69
     * @return
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/registration/RegistrationWorkingSetService.java
291 291

  
292 292
        /* for debugging https://dev.e-taxonomy.eu/redmine/issues/7331 */
293 293
        // debugIssue7331(pager);
294
        return new RegistrationWorkingSet(makeDTOs(pager.getRecords()));
294
        RegistrationWorkingSet registrationWorkingSet;
295
        if(pager.getCount() > 0) {
296
            registrationWorkingSet = new RegistrationWorkingSet(makeDTOs(pager.getRecords()));
297
        } else {
298
            registrationWorkingSet = new RegistrationWorkingSet(reference);
299
        }
300
        return registrationWorkingSet;
295 301
    }
296 302

  
297 303

  

Also available in: Unified diff