From 8050c4005712704b3abd33eec3d527c647faf5a2 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 9 Jun 2006 04:39:14 +0000 Subject: [PATCH] fix bug in upgrade script. Survey sub-tables use Survey_id, not assetId. --- docs/upgrades/upgrade_6.99.3-6.99.4.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/upgrades/upgrade_6.99.3-6.99.4.pl b/docs/upgrades/upgrade_6.99.3-6.99.4.pl index cf05a9560..b44631cb4 100644 --- a/docs/upgrades/upgrade_6.99.3-6.99.4.pl +++ b/docs/upgrades/upgrade_6.99.3-6.99.4.pl @@ -41,7 +41,8 @@ sub fixSurvey{ my $survey = WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Wobject::Survey'); my $i18n = WebGUI::International->new($session, 'Asset_Survey'); my $noneLabel = $i18n->get(107); - my ($defaultSectionId) = $session->db->quickArray("select Survey_sectionId from Survey_section where assetId=? and sectionName=?", [$assetId,$noneLabel]); + my $surveyId = $survey->get('Survey_id'); + my ($defaultSectionId) = $session->db->quickArray("select Survey_sectionId from Survey_section where Survey_id=? and sectionName=?", [$surveyId,$noneLabel]); $survey->update({defaultSectionId => $defaultSectionId}); } }