Commit 559b4ebc authored by Azat Khuziyakhmetov's avatar Azat Khuziyakhmetov
Browse files

fixed a bug in formatting part of the json output

parent 04c95026
......@@ -12,6 +12,7 @@ def get_value(agg, path, **ids):
recvar = agg
for c in classes:
if not hasattr(recvar, c):
return None
raise ValueError("scheme: {} from {} was not found".format(c, path))
recvar = getattr(recvar, c)
......@@ -56,7 +57,7 @@ def format_scheme(agg, sstruc, path="", **ids):
elif sstruc["type"] == "list":
result = []
for fkey, _ in enumerate(get_value(agg, build_path(path, sstruc["path"]), **ids)):
ids = {sstruc["path"]: fkey}
ids[sstruc["path"]] = fkey
fres = fill_scheme(agg, sstruc["scheme"], build_path(path, sstruc["path"]), **ids)
result.append(fres)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment