fix Locked shelf assets
This commit is contained in:
parent
fee64b013f
commit
0b671837d5
1 changed files with 18 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ my $session = start(); # this line required
|
|||
|
||||
# upgrade functions go here
|
||||
deleteBadReceiptEmailTemplate($session);
|
||||
unlockShelfAssets($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -43,6 +44,23 @@ finish($session); # this line required
|
|||
# print "DONE!\n" unless $quiet;
|
||||
#}
|
||||
|
||||
sub unlockShelfAssets {
|
||||
my $session = shift;
|
||||
print "\tUnlocking assets from improper Shelf package import..." unless $quiet;
|
||||
for my $id (qw(4e-_rNs6mSWedZhQ_V5kJA 6tK47xsaIH-ELw0IBo0uRQ XNd7a_g_cTvJVYrVHcx2Mw _bZJ9LA_KNekZiFPaP2SeQ nFen0xjkZn8WkpM93C9ceQ)) {
|
||||
my $asset = WebGUI::Asset->new($session, $id);
|
||||
if ($asset && $asset->get('isLockedBy')) {
|
||||
my $tagId = $asset->get('tagId');
|
||||
my $versionTag = WebGUI::VersionTag->new($session, $tagId);
|
||||
if (! $versionTag->get('isLocked')) {
|
||||
$asset->commit;
|
||||
}
|
||||
}
|
||||
}
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
|
||||
sub deleteBadReceiptEmailTemplate {
|
||||
my $session = shift;
|
||||
print "\tDeleting bad Shop Email Receipt template... " unless $quiet;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue