Bug 15415 [QA Followup] - Make code more readable
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 23 Dec 2016 11:31:00 +0000 (11:31 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 23 Dec 2016 11:31:00 +0000 (11:31 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
patroncards/edit-profile.pl

index 0dc312f..b7e61bd 100755 (executable)
@@ -88,8 +88,9 @@ foreach my $unit (@$units) {
     }
 }
 
-if ($profile_id) { # if new layout, there will be no profile id, so shouldn't look for it
-    $template->param(profile_id => $profile->get_attr('profile_id')) if $profile->get_attr('profile_id') > 0;
+# if new layout, there will be no profile id, so shouldn't look for it
+if ( $profile_id && $profile->get_attr('profile_id') > 0 ) {
+    $template->param( profile_id => $profile->get_attr('profile_id') );
 }
 
 $template->param(