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

(-)a/Koha/Patron/Modification.pm (-5 / +6 lines)
Lines 131-147 sub approve { Link Here
131
                    );
131
                    );
132
                }
132
                }
133
                foreach my $attr ( @{$extended_attributes} ) {
133
                foreach my $attr ( @{$extended_attributes} ) {
134
                    $attr->{attribute} = exists $attr->{attribute} ? $attr->{attribute} : $attr->{value};
134
                    Koha::Patron::Attribute->new(
135
                    Koha::Patron::Attribute->new(
135
                        {   borrowernumber => $patron->borrowernumber,
136
                        {   borrowernumber => $patron->borrowernumber,
136
                            code           => $attr->{code},
137
                            code           => $attr->{code},
137
                            attribute      => $attr->{value}
138
                            attribute      => $attr->{attribute},
138
                        }
139
                        }
139
                    )->store
140
                    )->store
140
                        if $attr->{value} # there's a value
141
                        if $attr->{attribute} # there's a value
141
                           or
142
                           or
142
                          (    defined $attr->{value} # there's a value that is 0, and not
143
                          (    defined $attr->{attribute} # there's a value that is 0, and not
143
                            && $attr->{value} ne ""   # the empty string which means delete
144
                            && $attr->{attribute} ne ""   # the empty string which means delete
144
                            && $attr->{value} == 0
145
                            && $attr->{attribute} == 0
145
                          );
146
                          );
146
                }
147
                }
147
            }
148
            }
(-)a/Koha/Patron/Modifications.pm (-2 / +1 lines)
Lines 131-137 sub pending { Link Here
131
                        Koha::Patron::Attribute->new(
131
                        Koha::Patron::Attribute->new(
132
                        {   borrowernumber => $row->{borrowernumber},
132
                        {   borrowernumber => $row->{borrowernumber},
133
                            code           => $attr->{code},
133
                            code           => $attr->{code},
134
                            attribute      => $attr->{value}
134
                            attribute      => exists $attr->{attribute} ? $attr->{attribute} : $attr->{value},
135
                        }
135
                        }
136
                        );
136
                        );
137
                }
137
                }
138
- 

Return to bug 20443