update manufacturer structure to include notice field
This commit is contained in:
parent
fb340daf38
commit
81b03547c7
Binary file not shown.
Binary file not shown.
@ -26,6 +26,4 @@ poetry run python import/main.py ../data/atr_data.xlsx
|
|||||||
You should see output showing the individual objects it extracted from your excel sheet along with a success message at the end.
|
You should see output showing the individual objects it extracted from your excel sheet along with a success message at the end.
|
||||||
|
|
||||||
# Expected Data Format
|
# Expected Data Format
|
||||||
***TODO:*** Outline expected data format for the utility.
|
See {project_root}/data/atr_data.xlsx
|
||||||
|
|
||||||
See atr_data.xlsx
|
|
@ -29,11 +29,17 @@ def get_manufacturer(row, col):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
required = row.loc[col]['required']
|
required = row.loc[col]['required']
|
||||||
return {
|
|
||||||
|
manufacturer_info = {
|
||||||
"name": row.loc[col]['entry'],
|
"name": row.loc[col]['entry'],
|
||||||
"required": isinstance(required, str)
|
"required": isinstance(required, str)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if isinstance(row.loc[col]['notice'], str) and len(row.loc[col]['notice'].strip()) > 0:
|
||||||
|
manufacturer_info["notice"] = row.loc[col]['notice']
|
||||||
|
|
||||||
|
return manufacturer_info
|
||||||
|
|
||||||
def get_selected_options(row, col):
|
def get_selected_options(row, col):
|
||||||
return row.loc[col].dropna(inplace=False).index.to_list()
|
return row.loc[col].dropna(inplace=False).index.to_list()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user