X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/d17e1b9d1b761bb19d0cb79a742ea70a07028998..refs/heads/price_source:/SL/DB/RequirementSpecComplexity.pm diff --git a/SL/DB/RequirementSpecComplexity.pm b/SL/DB/RequirementSpecComplexity.pm index eaf74069b..5cdea0c06 100644 --- a/SL/DB/RequirementSpecComplexity.pm +++ b/SL/DB/RequirementSpecComplexity.pm @@ -3,17 +3,18 @@ package SL::DB::RequirementSpecComplexity; use strict; use SL::DB::MetaSetup::RequirementSpecComplexity; +use SL::DB::Manager::RequirementSpecComplexity; use SL::DB::Helper::ActsAsList; use SL::Locale::String; -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; +__PACKAGE__->meta->initialize; sub validate { my ($self) = @_; my @errors; - push @errors, t8('The description is missing.') if !$self->description; + push @errors, t8('The description is missing.') if !$self->description; + push @errors, t8('The description is not unique.') if $self->get_first_conflicting('description'); return @errors; }