Changeset 1949


Ignore:
Timestamp:
02/14/17 20:07:23 (7 years ago)
Author:
nanardon
Message:

Ignore resetEmployment result

Location:
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql
Files:
2 edited

Legend:

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

    r1945 r1949  
    317317    $user or return; 
    318318    my $res = $class->SUPER::_create($base, $id, %data); 
    319     $user->applyCurrentEmployment or return; 
     319    $user->applyCurrentEmployment; 
    320320    $res; 
    321321} 
     
    332332    if ($res) { 
    333333        my $ouser = $base->get_object('user', $user); 
    334         $ouser->applyCurrentEmployment or return; 
     334        $ouser->applyCurrentEmployment; 
    335335    } 
    336336 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm

    r1948 r1949  
    16001600        } 
    16011601    } 
    1602     if (!%changes) { 
    1603         return 1 
    1604     } elsif ($self->set_fields(%changes)) { 
    1605         $self->base->log(LA_NOTICE, "Updating user %s to match unemployment", $self->id); 
    1606         $self->ReportChange('Update', 'Update %s to match unemployment', join(', ', sort keys %changes)); 
     1602    if (%changes) { 
     1603        if ($self->set_fields(%changes)) { 
     1604            $self->base->log(LA_NOTICE, "Updating user %s to match unemployment", $self->id); 
     1605            $self->ReportChange('Update', 'Update %s to match unemployment', join(', ', sort keys %changes)); 
     1606            return 1; 
     1607        } else { 
     1608            return 0; 
     1609        } 
     1610    } else { 
    16071611        return 1; 
    16081612    } 
    16091613 
    1610     return 0; 
    16111614} 
    16121615 
Note: See TracChangeset for help on using the changeset viewer.