Update maxheight field to be a string
This commit is contained in:
parent
ab48059387
commit
29417ca4e8
4 changed files with 25 additions and 4 deletions
|
@ -17,7 +17,7 @@ ECO_REGION_ADJUSTMENTS = {
|
|||
# Relevant columns and information used to retrieve information from the spreadsheet
|
||||
PLANT_COLS = {
|
||||
'SCIENTIFIC NAME': {"str": "name", "expected_type": str, "max_length": 50},
|
||||
'MAX HT': {"str": "maxheight", "expected_type": float},
|
||||
'MAX HT': {"str": "maxheight", "expected_type": str},
|
||||
'SPACING': {"str": "spacing", "expected_type": float},
|
||||
'COMMON NAME': {"str": "commonname", "expected_type": str, "null_allowed": True, "max_length": 200},
|
||||
'SYNONYM': {"str": "synonym", "expected_type": str, "null_allowed": True, "max_length": 200},
|
||||
|
|
|
@ -56,6 +56,9 @@ def get_plant_json_from_row(row_data):
|
|||
row_data[field_index], SOIL_ORDER_PK_MAPPING)
|
||||
plant_json_fields[model_field_name] = soil_orders_list
|
||||
|
||||
elif field_str == "maxheight":
|
||||
plant_json_fields[model_field_name] = str(row_data[field_index])
|
||||
|
||||
elif field_str in {'wet', 'mesic', 'dry'}:
|
||||
if row_data[field_index] != None:
|
||||
soil_variant_pk = SOIL_VARIANT_PK_MAPPING[field.capitalize()]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue