Use Moose method modifiers for overriding addRev in Story.
This commit is contained in:
parent
82bc730a8a
commit
a10e65f883
1 changed files with 4 additions and 11 deletions
|
|
@ -117,23 +117,16 @@ Request autocommit.
|
|||
|
||||
=cut
|
||||
|
||||
sub addRevision {
|
||||
around addRevision => sub {
|
||||
my $orig = shift;
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $newSelf = $self->next::method(@_);
|
||||
|
||||
my $newProperties = {
|
||||
isHidden => 1,
|
||||
};
|
||||
|
||||
$newSelf->update($newProperties);
|
||||
my $newSelf = $self->$orig(@_);
|
||||
|
||||
my $newPhotoData = $newSelf->duplicatePhotoData;
|
||||
$newSelf->setPhotoData($newPhotoData);
|
||||
#$newSelf->requestAutoCommit;
|
||||
|
||||
return $newSelf;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue