Changeset 745 for LATMOS-Accounts/lib
- Timestamp:
- 01/25/10 13:50:53 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r742 r745 404 404 grep { $attr eq $_ } (__PACKAGE__->_office_address_fields, __PACKAGE__->_address_fields()) and do { 405 405 my $fmainaddress = $self->_get_c_field('mainaddress'); 406 if (!$fmainaddress) { 406 # set address attribute => create address object on the fly 407 # except if attr is empty ! 408 if (!$fmainaddress && $data{$attr}) { 407 409 $fmainaddress = $self->id . '-' . join('', map { ('a'..'z')[rand(26)] } 408 410 (0..4)); … … 416 418 }; 417 419 } 418 if (my $address = $self->base->get_object('address', $fmainaddress)) { 420 if ($fmainaddress && 421 (my $address = $self->base->get_object('address', $fmainaddress))) { 419 422 $res += $address->set_c_fields($attr => $data{$attr}) ||0; 420 423 }
Note: See TracChangeset
for help on using the changeset viewer.