Skip to content

Commit

Permalink
fix(mapping_template): use safer unpacks to omit potential error
Browse files Browse the repository at this point in the history
  • Loading branch information
yshalenyk committed Jul 26, 2024
1 parent 002633e commit af879d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nightingale/mapping_template/v09/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def get_element_by_mapping(self, for_mapping):
def read_data_elements_sheet(self, sheet):
elements = {}
for row in sheet.iter_rows(min_row=4, values_only=True):
for_mapping, data_source, table, data_element, publish, example, description, data_type, _, _, _, _ = row
for_mapping, data_source, table, data_element, publish, example, description, data_type, *_ = row
if not data_element:
continue
elements[data_element] = {
Expand All @@ -118,7 +118,7 @@ def read_schema_sheet(self):
schema = {}
for sheet in sheets:
for row in sheet.iter_rows(min_row=2, values_only=True):
_, path, title, description, type, range, values, links, _, _ = row
_, path, title, description, type, range, values, links, *_ = row
if not path:
continue
path = "/" + path
Expand Down

0 comments on commit af879d3

Please sign in to comment.