Fix 10939, commit with approval breaks on assets with autocommit children, Post, Story, Wiki, Event, etc.

Encapsulate a new method to get a fresh asset from the db.  With tests.
This commit is contained in:
Colin Kuskie 2009-09-08 21:17:41 -07:00
parent 2cf67ecba4
commit 2948e68781
4 changed files with 53 additions and 16 deletions

View file

@ -889,9 +889,9 @@ sub www_editDuplicate {
# Auto-commit our revision if necessary
# TODO: This needs to be handled automatically somehow...
my $status = WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session);
##Force the locked by tag
##get a fresh object from the database
if ($status eq 'commit') {
$newTemplate->{_properties}{isLockedBy} = undef;
$newTemplate = $newTemplate->cloneFromDb;
}
last DEF;
}