Change calls to new to newById across Asset/
This commit is contained in:
parent
da574279d9
commit
814c2af249
55 changed files with 98 additions and 98 deletions
|
|
@ -506,7 +506,7 @@ sub run {
|
|||
|
||||
# Instantiate the asset to check it is a Survey instance, and to grab its assetId
|
||||
if ( $session->id->valid($asset_spec) ) {
|
||||
$asset = WebGUI::Asset->new( $session, $asset_spec );
|
||||
$asset = WebGUI::Asset->newById( $session, $asset_spec );
|
||||
}
|
||||
if ( !$asset ) {
|
||||
$asset = WebGUI::Asset->newByUrl( $session, $asset_spec );
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ sub run {
|
|||
}
|
||||
|
||||
my $assetId = $self->get('assetId');
|
||||
my $survey = WebGUI::Asset::Wobject::Survey->new($session, $assetId);
|
||||
my $survey = WebGUI::Asset::Wobject::Survey->newById($session, $assetId);
|
||||
if (!$survey || !$survey->isa('WebGUI::Asset::Wobject::Survey') ) {
|
||||
return { tap => "Bail Out! Unable to instantiate Survey using assetId: $assetId" };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue