Changeset 1941


Ignore:
Timestamp:
01/30/17 19:52:23 (7 years ago)
Author:
nanardon
Message:

Don't remove from group is previous dpmt is no longer one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm

    r1935 r1941  
    14651465        $old = $self->_get_attributes('department'); 
    14661466    } 
     1467 
    14671468    if (($data{department} || '') eq ($old || '')) { 
    14681469        # We do not remove the group, there is no change 
    14691470        $old = undef; 
     1471    } 
     1472 
     1473    if ($old) { 
     1474        # If the department is no longer a department 
     1475        # we do nothing 
     1476        my @names = $self->base->search_objects('group', 'name=' . $old, 'sutype=dpmt'); 
     1477        if (! @names) { 
     1478            $old = undef; 
     1479        } 
    14701480    } 
    14711481 
Note: See TracChangeset for help on using the changeset viewer.