X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/2ff2f6c9c9f95845ddb83d1cef264e580977759c..bbbedfda3f5c771ff03f6445abe185cddc664680:/SL/DB/Department.pm 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;