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

(-)a/Koha/Patron/Attribute.pm (-5 / +2 lines)
Lines 109-116 sub _check_repeatable { Link Here
109
    my $self = shift;
109
    my $self = shift;
110
110
111
    if ( !$self->type->repeatable ) {
111
    if ( !$self->type->repeatable ) {
112
        my $attr_count
112
        my $attr_count = Koha::Patron::Attributes->search(
113
            = Koha::Database->new->schema->resultset( $self->_type )->search(
114
            {   borrowernumber => $self->borrowernumber,
113
            {   borrowernumber => $self->borrowernumber,
115
                code           => $self->code
114
                code           => $self->code
116
            }
115
            }
Lines 135-142 sub _check_unique_id { Link Here
135
    my $self = shift;
134
    my $self = shift;
136
135
137
    if ( $self->type->unique_id ) {
136
    if ( $self->type->unique_id ) {
138
        my $unique_count
137
        my $unique_count = Koha::Patron::Attributes
139
            = Koha::Database->new->schema->resultset( $self->_type )
140
            ->search( { code => $self->code, attribute => $self->attribute } )
138
            ->search( { code => $self->code, attribute => $self->attribute } )
141
            ->count;
139
            ->count;
142
        Koha::Exceptions::Patron::Attribute::UniqueIDConstraint->throw()
140
        Koha::Exceptions::Patron::Attribute::UniqueIDConstraint->throw()
143
- 

Return to bug 17828