From 6216144070062f2cd418611785f0b5ac827d0281 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 30 Jan 2022 20:02:30 +0300 Subject: [PATCH] util/generate-hugo-content.py: controlled vocabularies We are planning to remove the controlled vocabularies from the CSV files so we should not expect that this column will exist. Instead, check if there is a controlled vocabulary in the data directory. The controlled vocabularies were already exported once using the util/export-controlled-vocabularies.py script so we don't actually need them in the CSVs anymore. --- util/generate-hugo-content.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/generate-hugo-content.py b/util/generate-hugo-content.py index 04c1840b..61b03fb7 100755 --- a/util/generate-hugo-content.py +++ b/util/generate-hugo-content.py @@ -90,7 +90,7 @@ def parseSchema(schema_df): cardinality = row["element options"].capitalize() prop_type = row["element type"].capitalize() - if row["element controlled values or terms"]: + if os.path.isfile(f"data/controlled-vocabularies/{element_name_safe}.txt"): controlled_vocab = True controlled_vocabulary_src = (