Log an error if duplicate cannot make a copy of itself.
This commit is contained in:
parent
8fd0be0dc4
commit
6b1fde7038
1 changed files with 5 additions and 1 deletions
|
|
@ -90,9 +90,13 @@ Assets that normally autocommit their workflows (like CS Posts, and Wiki Pages)
|
||||||
sub duplicate {
|
sub duplicate {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $options = shift;
|
my $options = shift;
|
||||||
|
my $parent = $self->getParent;
|
||||||
my $newAsset
|
my $newAsset
|
||||||
= $self->getParent->addChild( $self->get, undef, $self->get("revisionDate"), { skipAutoCommitWorkflows => $options->{skipAutoCommitWorkflows} } );
|
= $parent->addChild( $self->get, undef, $self->get("revisionDate"), { skipAutoCommitWorkflows => $options->{skipAutoCommitWorkflows} } );
|
||||||
|
|
||||||
|
$self->session->log->error(
|
||||||
|
sprintf "Unable to add child %s (%s) to %s (%s)", $self->getTitle, $self->getId, $parent->getTitle, $parent->getId
|
||||||
|
);
|
||||||
# Duplicate metadata fields
|
# Duplicate metadata fields
|
||||||
my $sth = $self->session->db->read(
|
my $sth = $self->session->db->read(
|
||||||
"select * from metaData_values where assetId = ?",
|
"select * from metaData_values where assetId = ?",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue