View | Details | Raw Unified | Return to bug 11853
Collapse All | Expand All

(-)a/Koha/Patron/Modification.pm (-5 / +9 lines)
Lines 92-105 sub approve { Link Here
92
    delete $data->{verification_token};
92
    delete $data->{verification_token};
93
    delete $data->{extended_attributes};
93
    delete $data->{extended_attributes};
94
94
95
    foreach my $key ( keys %$data ) {
96
        delete $data->{$key} unless ( defined( $data->{$key} ) );
97
    }
98
99
    my $patron = Koha::Patrons->find( $self->borrowernumber );
95
    my $patron = Koha::Patrons->find( $self->borrowernumber );
100
101
    return unless $patron;
96
    return unless $patron;
102
97
98
    foreach my $key ( keys %$data ) {
99
        next # Unset it!
100
          if $key eq 'dateofbirth'
101
          && $patron->dateofbirth
102
          && not defined $data->{$key};
103
104
        delete $data->{$key} unless defined $data->{$key};
105
    }
106
103
    $patron->set($data);
107
    $patron->set($data);
104
108
105
    # Take care of extended attributes
109
    # Take care of extended attributes
(-)a/Koha/Patron/Modifications.pm (-2 / +5 lines)
Lines 132-138 sub pending { Link Here
132
132
133
                $row->{$key} = \@pending_attributes;
133
                $row->{$key} = \@pending_attributes;
134
            }
134
            }
135
            delete $row->{$key} unless defined $row->{$key};
135
            if ( $key eq 'dateofbirth' and not defined $row->{$key}) {
136
                $row->{$key} = '';
137
            } else {
138
                delete $row->{$key} unless defined $row->{$key};
139
            }
136
        }
140
        }
137
141
138
        push( @m, $row );
142
        push( @m, $row );
139
- 

Return to bug 11853