Scripts: Check parameter name for leading/trailing spaces

This commit is contained in:
Shahram Najm 2022-06-21 16:23:22 +01:00
parent 9e788b17bd
commit 1c4ae04767
1 changed files with 3 additions and 0 deletions

View File

@ -126,6 +126,9 @@ if ($SANITY_CHECK) {
my $x = $dbh->selectrow_array("select * from param.param where id = ?",undef,$paramId);
die "Error: paramId=$x exists in the database (line ", $lcount+1, ")\n" if (defined $x);
die "Error: Name '$name': ends in space" if ($name =~ / $/);
die "Error: Name '$name': starts with space" if ($name =~ /^ /);
# Will die if it fails
get_db_units_code($units);