Revision 2191ef7f
Von Sven Schöling vor fast 2 Jahren hinzugefügt
SL/DB/Manager/PriceRuleItem.pm | ||
---|---|---|
97 | 97 |
part => 'int', |
98 | 98 |
number => 'num', |
99 | 99 |
date => 'date', |
100 |
text => undef, |
|
101 |
textfield => undef, |
|
102 |
bool => undef, |
|
100 | 103 |
); |
101 | 104 |
|
102 | 105 |
my %ops_by_cvar_type = ( |
... | ... | |
139 | 142 |
}, |
140 | 143 |
); |
141 | 144 |
|
142 |
my $data_type = $price_rule_type_by_cvar_type{$config->type} or |
|
145 |
my $data_type; |
|
146 |
if (exists $price_rule_type_by_cvar_type{$config->type}) { |
|
147 |
# known but undef typedefs are ignored. |
|
148 |
# those cvar configs are not supported and can not be used in price rules |
|
149 |
$data_type = $price_rule_type_by_cvar_type{$config->type} or next; |
|
150 |
} else { |
|
143 | 151 |
die "cvar type @{[$config->type]} is not supported in price rules"; |
152 |
} |
|
144 | 153 |
|
145 | 154 |
my $ops = $ops_by_cvar_type{$config->type}; |
146 | 155 |
|
Auch abrufbar als: Unified diff
PriceRule: bei nicht unterstützten CVar Typen nicht abbrechen
nur bei unbekannten Typen, weil die wahrscheinlich ein Fehler sind.