diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm
index 380d1a84f..68b6a6279 100644
--- a/perl-xCAT/xCAT/DBobjUtils.pm
+++ b/perl-xCAT/xCAT/DBobjUtils.pm
@@ -765,6 +765,9 @@ sub setobjdefs
         # get the object type decription from Schema.pm
         my $datatype = $xCAT::Schema::defspec{$type};
 
+		# get the key to look for, for this object type
+        my $objkey = $datatype->{'objkey'};
+
         #  get a list of valid attr names
         #               for this type object
         my %attrlist;
@@ -779,6 +782,11 @@ sub setobjdefs
         foreach my $attr (keys %{$objhash{$objname}})
         {
 
+		if ($attr eq $objkey)
+		{
+			next;
+		}
+
             if ($attr eq "objtype")
             {
 
@@ -818,6 +826,10 @@ sub setobjdefs
 			my ($lookup_table, $lookup_attr);
             my $attr_name = $this_attr->{attr_name};
 
+			if ($attr_name eq $objkey)
+			{
+    			next;
+			}
 
             # if we have a value for this attribute then process it
             #   - otherwise go to the next attr
diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm
index cd34deee7..921f69ce2 100644
--- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm
+++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm
@@ -2456,10 +2456,6 @@ sub defls
                             {
                                 $attrval = $defhash{$obj}{$showattr};
                             }
-                            else
-                            {
-                                $attrval = " ";
-                            }
 
                             # if an attr list was provided then just display those
                             if ($::opt_i)
@@ -2513,7 +2509,7 @@ sub defls
                                 {
 
                                     # don't print unless set
-									if ( (defined $attrval) && ($attrval ne " "))	
+									if ($attrval)	
                                     {
                                         my $rsp;
                                         $rsp->{data}->[0] =