pull/459/head
Andrey Dolgolev 2021-11-24 21:37:30 +02:00
rodzic aa4be7a6f5
commit e1930efeb6
1 zmienionych plików z 7 dodań i 4 usunięć

Wyświetl plik

@ -274,7 +274,7 @@ async def update_dashboard_handler(
"bucket" "bucket"
] ]
abi_path = available_subscriptions[dashboard_subscription.subscription_id][ abi_path = available_subscriptions[dashboard_subscription.subscription_id][
"abi_path" "s3_path"
] ]
if bucket is None or abi_path is None: if bucket is None or abi_path is None:
@ -303,8 +303,7 @@ async def update_dashboard_handler(
internal_error=e, internal_error=e,
detail=f"We can't access the abi for subscription with id:{dashboard_subscription.subscription_id}.", detail=f"We can't access the abi for subscription with id:{dashboard_subscription.subscription_id}.",
) )
abi = json.loads(response["Body"].read())
abi = data.DashboardMeta(**response["Body"].read().decode("utf-8"))
actions.dashboards_abi_validation( actions.dashboards_abi_validation(
dashboard_subscription, abi, s3_path=s3_path dashboard_subscription, abi, s3_path=s3_path
@ -320,7 +319,11 @@ async def update_dashboard_handler(
if dashboard_subscriptions: if dashboard_subscriptions:
dashboard_resource["subscriptions"] = dashboard_subscriptions json.loads(dashboard.json())
dashboard_resource["dashboard_subscriptions"] = json.loads(dashboard.json())[
"subscriptions"
]
if dashboard.name is not None: if dashboard.name is not None:
dashboard_resource["name"] = dashboard.name dashboard_resource["name"] = dashboard.name