Changeset 2411


Ignore:
Timestamp:
06/23/20 01:21:04 (4 years ago)
Author:
nanardon
Message:

Fix: objects not synchronised

Location:
trunk/LATMOS-Accounts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Synchro.pm

    r2408 r2411  
    294294                $filtering{$otype} = { map { $_ => 1 } 
    295295                    $self->from->search_objects($otype, $filter, 'oalias=NULL') }; 
     296            } else { 
     297                $filtering{$otype} = $existings{$otype}; 
    296298            } 
    297299 
     
    319321            foreach ($destbase->listRealObjects($otype)) { 
    320322 
    321                 if ($filtering{$otype}{$_} || $existings{$otype}{$_}) { 
     323                if ($filtering{$otype}{$_}) { 
    322324                    # the object must exists 
    323325                    next; 
     
    363365                foreach (keys %{ $existings{ $otype } || {} }) { 
    364366                    $destExists{ $_ } and next; 
    365                     $filtering{$otype}{$_} and next; 
     367                    $filtering{$otype}{$_} or next; 
    366368                    $ObjList{ $_ } = 1; 
    367369                } 
  • trunk/LATMOS-Accounts/t/25_la_synchro.t

    r1071 r2411  
    6767{ 
    6868ok(my $user =  $unixb->get_object('user', 'adm'),  "Can get adm user"); 
    69 is($user->get_field('gecos'), 'adm', 'Can get home directory'); 
     69is($user->get_field('gecos'), 'adm', 'Can get gecos'); 
    7070} 
    7171 
Note: See TracChangeset for help on using the changeset viewer.