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

(-)a/Koha/Exceptions/Object.pm (+5 lines)
Lines 23-28 use Exception::Class ( Link Here
23
    'Koha::Exceptions::Object' => {
23
    'Koha::Exceptions::Object' => {
24
        isa         => 'Koha::Exceptions::Exception',
24
        isa         => 'Koha::Exceptions::Exception',
25
    },
25
    },
26
    'Koha::Exceptions::Object::Dirty' => {
27
        isa         => 'Koha::Exceptions::Object',
28
        description => "Dirty object passed to unblessed",
29
        fields      =>  ['dirty_fields']
30
    },
26
    'Koha::Exceptions::Object::DuplicateID' => {
31
    'Koha::Exceptions::Object::DuplicateID' => {
27
        isa         => 'Koha::Exceptions::Object',
32
        isa         => 'Koha::Exceptions::Object',
28
        description => "Duplicate ID passed",
33
        description => "Duplicate ID passed",
(-)a/Koha/Object.pm (-1 / +4 lines)
Lines 319-324 Returns an unblessed representation of object. Link Here
319
sub unblessed {
319
sub unblessed {
320
    my ($self) = @_;
320
    my ($self) = @_;
321
321
322
    Koha::Exceptions::Object::Dirty->throw(
323
        { dirty_fields => [ keys %{ $self->_result->get_dirty_columns } ] } )
324
      if $self->_result->get_dirty_columns;
325
322
    return { $self->_result->get_columns };
326
    return { $self->_result->get_columns };
323
}
327
}
324
328
325
- 

Return to bug 28700