mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 20:30:56 +00:00
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:
@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user