Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add back migrate_keys_from for list to keep backward compat. This stu…

…ff is deprecated
  • Loading branch information...
commit ccb9da025a0c523443a4ca26774e48fb5d54793b 1 parent a173b16
@dod38fr authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 config-model-core/lib/Config/Model/ListId.pm
View
7 config-model-core/lib/Config/Model/ListId.pm
@@ -29,7 +29,6 @@ sub BUILD {
if (defined $self->{migrate_keys_from}) {
warn $self->name, "Using migrate_keys_from with list element is deprecated.",
" Use migrate_values_from\n" ;
- delete $self->{migrate_keys_from} ;
}
# Supply the mandatory parameter
@@ -76,6 +75,12 @@ sub _migrate {
$self->fetch_with_id( $idx++ )->load_data($data) ;
}
}
+ elsif ($self->{migrate_keys_from}) {
+ # FIXME: remove this deprecated stuff
+ my $followed = $self->safe_typed_grab(param => 'migrate_keys_from', check => 'no') ;
+ map { $self->_store($_, undef) unless $self->_defined($_) } $followed -> fetch_all_indexes ;
+ }
+
}
Please sign in to comment.
Something went wrong with that request. Please try again.