From 5f6044727998bc443d42a1e95466f0f4ed7a9752 Mon Sep 17 00:00:00 2001 From: nott Date: Thu, 29 Jan 2009 18:42:59 +0000 Subject: [PATCH] Add check to make sure the objtype value is provided. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2669 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 2102a6ba7..6c4b49ad0 100644 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -1916,6 +1916,15 @@ sub setFINALattrs } # get the data type definition from Schema.pm + + if (!$::FILEATTRS{$objname}{objtype}) { + my $rsp; + $rsp->{data}->[0] = "\nNo objtype value was specified for \'$objname\'. Cannot create object definition.\n"; + xCAT::MsgUtils->message("E", $rsp, $::callback); + $error = 1; + next; + } + my $datatype = $xCAT::Schema::defspec{$::FILEATTRS{$objname}{objtype}}; my @list;