Revision 5daf8baa
Von Tamino Steinert vor 10 Monaten hinzugefügt
SL/DB/Part.pm | ||
---|---|---|
161 | 161 |
foreach my $variant (@$other_variants) { |
162 | 162 |
next if $variant->id == $self->id; |
163 | 163 |
my @other_property_value_ids = sort map {$_->id} $variant->variant_property_values; |
164 |
if (@other_property_value_ids == @property_value_ids |
|
165 |
&& not any {$_} pairwise {$a != $b} @other_property_value_ids, @property_value_ids |
|
166 |
) { |
|
167 |
die t8("There is already a variant with the property values: "), |
|
164 |
if ("@other_property_value_ids" eq "@property_value_ids") { |
|
165 |
die t8("There is already a variant of '#1' with the property values: ", $parent_variant->displayable_name), |
|
168 | 166 |
join(' ,', map {$_->displayable_name} $self->variant_property_values); |
169 | 167 |
} |
170 | 168 |
} |
... | ... | |
542 | 540 |
|
543 | 541 |
my @selected_variant_property_ids = sort map {$_->variant_property_id} @$variant_property_values; |
544 | 542 |
my @variant_property_ids = sort map {$_->id} @{$self->variant_properties}; |
545 |
if (@variant_property_ids != @selected_variant_property_ids) {
|
|
546 |
die "Given variant_property_values dosn't match the variant_properties of parent_variant part";
|
|
543 |
if ("@variant_property_ids" ne "@selected_variant_property_ids") {
|
|
544 |
die "Given variant_property_values doesn't match the variant_properties of parent_variant part: " . $self->displayable_name;
|
|
547 | 545 |
} |
548 | 546 |
|
549 | 547 |
my $new_variant = $self->clone_and_reset; |
Auch abrufbar als: Unified diff
Varianten: S:D:Part: Validierungen angepasst