Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-11955

Backport OPENIDM-11640: null exception in defaultMappings.json

    XMLWordPrintable

Details

    Description

      Sometimes listOfAssignments is null when defaultMapping.js is called. When this happens, the following for loop will cause a null exception. 

      function findAssignment(assignment, listOfAssignments) {
          for (var i = 0; i < listOfAssignments.length; i++) {
                   if (assignment._id === listOfAssignments[i]._id) {
                       return listOfAssignments[i];
                   }
               }
          return null;
      }
      

      We added the following if statement to the file.

      if (!listOfAssignments) \{ 
      return null; 
      }
      

      Attachments

        Issue Links

          Activity

            People

              patrickdiligent patrick diligent
              mark.offutt Mark Offutt [X] (Inactive)
              Jakub Janoska [X] Jakub Janoska [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: