|
Lines 114-120
sub add {
Link Here
|
| 114 |
$vendor_to_store->aliases( $aliases || [] ); |
114 |
$vendor_to_store->aliases( $aliases || [] ); |
| 115 |
$vendor_to_store->interfaces( $interfaces || [] ); |
115 |
$vendor_to_store->interfaces( $interfaces || [] ); |
| 116 |
|
116 |
|
| 117 |
if ( scalar(@$extended_attributes) > 0 ) { |
117 |
if ( $extended_attributes && scalar(@$extended_attributes) > 0 ) { |
| 118 |
my @extended_attributes = |
118 |
my @extended_attributes = |
| 119 |
map { { 'id' => $_->{field_id}, 'value' => $_->{value} } } @{$extended_attributes}; |
119 |
map { { 'id' => $_->{field_id}, 'value' => $_->{value} } } @{$extended_attributes}; |
| 120 |
$vendor_to_store->extended_attributes( \@extended_attributes ); |
120 |
$vendor_to_store->extended_attributes( \@extended_attributes ); |
|
Lines 160-166
sub update {
Link Here
|
| 160 |
$vendor->aliases( $aliases || [] ) if defined $aliases; |
160 |
$vendor->aliases( $aliases || [] ) if defined $aliases; |
| 161 |
$vendor->interfaces( $interfaces || [] ) if defined $interfaces; |
161 |
$vendor->interfaces( $interfaces || [] ) if defined $interfaces; |
| 162 |
|
162 |
|
| 163 |
if ( scalar(@$extended_attributes) > 0 ) { |
163 |
if ( $extended_attributes && scalar(@$extended_attributes) > 0 ) { |
| 164 |
my @extended_attributes = |
164 |
my @extended_attributes = |
| 165 |
map { { 'id' => $_->{field_id}, 'value' => $_->{value} } } @{$extended_attributes}; |
165 |
map { { 'id' => $_->{field_id}, 'value' => $_->{value} } } @{$extended_attributes}; |
| 166 |
$vendor->extended_attributes( \@extended_attributes ); |
166 |
$vendor->extended_attributes( \@extended_attributes ); |
| 167 |
- |
|
|