Skip to content

Commit e227c86

Browse files
EliEli
authored andcommitted
Fixed unit for NCRO.
1 parent d64a672 commit e227c86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dms_datastore/reformat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def ncro_unit_json(header_text, param):
165165
}
166166

167167
yml = parse_yaml_header(header_text)
168+
unit = None
168169
if "agency_unit" in yml:
169170
agency_unit = yml["agency_unit"]
170171
if agency_unit.lower() == "misc":
@@ -177,8 +178,9 @@ def ncro_unit_json(header_text, param):
177178
)
178179
else:
179180
unit = param_defaults[param] if param in param_defaults else "unknown"
181+
if unit is not None and unit != "unknown":
182+
return unit
180183

181-
# print("agency_unit ", agency_unit," ", unit)
182184

183185
if agency_unit.lower() in unit_reformat:
184186
return unit_reformat[agency_unit.lower()]

0 commit comments

Comments
 (0)