• Richard Mansfield's avatar
    Check for authinstances in use when deleting institutions (bug #917873) · d1310840
    Richard Mansfield authored
    
    
    When you delete an institution, and one of the institution's
    authinstances is still in use by some users, you get an sql error and
    a nonrecoverable error screen. (This can only happen when the users
    still using the authinstance are not institution members, because
    there is already a check to stop deletion of institutions with
    members).
    
    This patch allows the institution to be deleted anyway, reassigning
    the offending users to a 'default' authinstance.  If we can't find a
    sensible default authinstance, it will at least display a more helpful
    error message.
    
    Also, when attempting to delete an institution with members, set an
    error on the form rather than throwing a ConfigException.
    
    Change-Id: I9c85a3c8c80411e3cf526767b9142efb12907e5c
    Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
    d1310840