X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FDepartment.pm;h=b00468c16aa70fda99b2d974a48c5211e10c1141;hb=b775c378552e6b5bf59f98046cdf4e577cd351df;hp=133886cdb484c840b9c9ec870e61f5eccd1afbe6;hpb=2ff2f6c9c9f95845ddb83d1cef264e580977759c;p=kivitendo-erp.git diff --git a/SL/DB/Department.pm b/SL/DB/Department.pm index 133886cdb..b00468c16 100644 --- a/SL/DB/Department.pm +++ b/SL/DB/Department.pm @@ -5,7 +5,7 @@ use strict; use SL::DB::MetaSetup::Department; use SL::DB::Manager::Department; -use SL::DB::DptTrans; +__PACKAGE__->meta->initialize; sub validate { my ($self) = @_; @@ -19,9 +19,9 @@ sub validate { sub is_used { my ($self) = @_; + # Since the removal of table dpt_trans no check is required here anymore. return undef if !$self->id; - my $is_used = SL::DB::Manager::DptTrans->find_by(department_id => $self->id); - return !!$is_used; + return 0; } 1;