We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d64a672 commit e227c86Copy full SHA for e227c86
dms_datastore/reformat.py
@@ -165,6 +165,7 @@ def ncro_unit_json(header_text, param):
165
}
166
167
yml = parse_yaml_header(header_text)
168
+ unit = None
169
if "agency_unit" in yml:
170
agency_unit = yml["agency_unit"]
171
if agency_unit.lower() == "misc":
@@ -177,8 +178,9 @@ def ncro_unit_json(header_text, param):
177
178
)
179
else:
180
unit = param_defaults[param] if param in param_defaults else "unknown"
181
+ if unit is not None and unit != "unknown":
182
+ return unit
183
- # print("agency_unit ", agency_unit," ", unit)
184
185
if agency_unit.lower() in unit_reformat:
186
return unit_reformat[agency_unit.lower()]
0 commit comments