Skip to content

Commit

Permalink
process.py: Guess schema for unflattening
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Nov 29, 2024
1 parent a053a26 commit 6efb889
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cove_bods/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,14 @@ def process(self, process_data: dict) -> dict:
# We don't know what schema version the spreadsheet is in. Use default schema.
schema = SchemaBODS()

config = LibCoveBODSConfig().config

if check_table_file_new(supplied_data_json_file):
statement_id_name = "statementID"
schema = config['schema_versions']['0.2']['schema_url']
else:
statement_id_name = "statementId"
schema = config['schema_versions'][config['schema_latest_version']]['schema_url']

unflatten_kwargs = {
"output_name": os.path.join(output_dir, "unflattened.json"),
Expand Down

0 comments on commit 6efb889

Please sign in to comment.