Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 4506

Show
Ignore:
Timestamp:
06/02/08 15:13:27 (7 months ago)
Author:
catullus
Message:

sync_bidirectional: fixed bug in user creation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/branches/data_synchronization_bidirectional/src/web/org/openmrs/web/controller/user/UserFormController.java

    r4356 r4506  
    137137                                                // the database, or else hibernate will throw a NonUniqueObjectException. 
    138138                                                Role role = null; 
    139                                                 for (Role test : user.getRoles()) 
    140                                                         if (test.getRole().equals(r)) 
    141                                                                 role = test; 
     139                                                if(user.getRoles() != null) { 
     140                                                        for (Role test : user.getRoles()) 
     141                                                                if (test.getRole().equals(r)) 
     142                                                                        role = test; 
     143                                                } 
    142144                                                if (role == null) { 
    143145                                                        role = us.getRole(r);