Fixed 'component' column isn't always added, so we must test before remove.

This commit is contained in:
Salvador E. Tropea 2020-08-01 15:35:12 -03:00
parent c3c86bc4ae
commit 0f57ff8b73
1 changed files with 2 additions and 1 deletions

View File

@ -234,7 +234,8 @@ class BoMOptions(BaseOptions):
columns.append(new_col)
columns_l[new_col.lower()] = new_col
# TODO less magic, more explicit
del columns_l['component']
if 'component' in columns_l:
del columns_l['component']
# Create a list of the columns we don't want
self.ignore = [c for c in valid_columns_l.keys() if c not in columns_l]
# And this is the ordered list with the case style defined by the user