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

(-)a/Koha/Patron.pm (-3 / +2 lines)
Lines 1578-1586 sub extended_attributes { Link Here
1578
                        { join => 'borrower_attribute_types_branches' }
1578
                        { join => 'borrower_attribute_types_branches' }
1579
                    )->get_column('class');
1579
                    )->get_column('class');
1580
                for my $type ( @required_attribute_types ) {
1580
                for my $type ( @required_attribute_types ) {
1581
                    Koha::Exceptions::Object::FKConstraint->throw(
1581
                    Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute->throw(
1582
                        broken_fk => "$type",
1582
                        type => $type,
1583
                        value     => "$type",
1584
                    ) if !$new_types->{$type};
1583
                    ) if !$new_types->{$type};
1585
                }
1584
                }
1586
            }
1585
            }
(-)a/t/db_dependent/Koha/Patron.t (-2 / +1 lines)
Lines 644-650 subtest 'extended_attributes' => sub { Link Here
644
                    ]
644
                    ]
645
                );
645
                );
646
            }
646
            }
647
            'Koha::Exceptions::Object::FKConstraint',
647
            'Koha::Exceptions::Patron::MissingMandatoryExtendedAttribute',
648
            'Exception thrown on missing mandatory attribute type';
648
            'Exception thrown on missing mandatory attribute type';
649
649
650
        is( $patron->extended_attributes->count, 0, 'Extended attributes storing rolled back' );
650
        is( $patron->extended_attributes->count, 0, 'Extended attributes storing rolled back' );
651
- 

Return to bug 27857