Make sure the same attr isn't displayed more then once.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@334 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
6a492166e4
commit
fb28b71c71
@ -843,8 +843,6 @@ sub defmk
|
||||
next;
|
||||
}
|
||||
|
||||
# ndebug mk
|
||||
|
||||
# if object already exists
|
||||
if (grep(/$obj/, @{$objTypeLists{$type}}))
|
||||
{
|
||||
@ -2159,9 +2157,13 @@ sub defls
|
||||
# get the data type definition from Schema.pm
|
||||
my $datatype =
|
||||
$xCAT::Schema::defspec{$defhash{$obj}{'objtype'}};
|
||||
my @alreadydone;
|
||||
foreach $this_attr (@{$datatype->{'attrs'}})
|
||||
{
|
||||
push(@attrlist, $this_attr->{attr_name});
|
||||
if (!grep(/^$this_attr->{attr_name}$/, @alreadydone)) {
|
||||
push(@attrlist, $this_attr->{attr_name});
|
||||
}
|
||||
push(@alreadydone, $this_attr->{attr_name});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user