mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 07:18:27 +01:00
plots: Fix repo with removed plots
Changes in dvc-render 0.0.5 caused error.
This commit is contained in:
+10
-8
@@ -52,14 +52,16 @@ def to_json(renderer, split: bool = False) -> List[Dict]:
|
||||
content = renderer.get_filled_template(skip_anchors=["data"])
|
||||
else:
|
||||
content = renderer.get_filled_template()
|
||||
return [
|
||||
{
|
||||
TYPE_KEY: renderer.TYPE,
|
||||
REVISIONS_KEY: sorted(grouped.keys()),
|
||||
"content": json.loads(content),
|
||||
"datapoints": grouped,
|
||||
}
|
||||
]
|
||||
if grouped:
|
||||
return [
|
||||
{
|
||||
TYPE_KEY: renderer.TYPE,
|
||||
REVISIONS_KEY: sorted(grouped.keys()),
|
||||
"content": json.loads(content),
|
||||
"datapoints": grouped,
|
||||
}
|
||||
]
|
||||
return []
|
||||
if renderer.TYPE == "image":
|
||||
return [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user