From f9a10a59dd303e0f7240a0a4eff5860f19248f90 Mon Sep 17 00:00:00 2001 From: powe97 <116031952+powe97@users.noreply.github.com> Date: Thu, 27 Jul 2023 17:36:17 -0400 Subject: [PATCH] fix --- src/GenerateHtml.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GenerateHtml.cpp b/src/GenerateHtml.cpp index a9c8ffc..8379164 100644 --- a/src/GenerateHtml.cpp +++ b/src/GenerateHtml.cpp @@ -223,7 +223,9 @@ Json::Value get_data(const Json::Value& data, } } else { out = data[course_id]; - out[key]["prefix"] = course_id.substr(0,4); + for(const auto& key : out.getMemberNames()) { + if(out[key].isObject()) out[key]["prefix"] = course_id.substr(0,4); + } } return out; }