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

null exception in defaultMappings.json

    Details

    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      2
    • Sprint:
      OpenIDM Sprint 6.5-10.1
    • Support Ticket IDs:

      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

              • Assignee:
                travis.haagen Travis Haagen
                Reporter:
                mark.offutt Mark Offutt [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: