fix: ensure json is not None (#24280)

This commit is contained in:
Elizabeth Thompson 2023-06-03 08:19:36 -07:00 committed by GitHub
parent c5ea40fb44
commit 40fffc396c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ def upgrade():
#
needs_upgrade = True
try:
json_metadata = json.loads(dashboard.json_metadata)
json_metadata = json.loads(dashboard.json_metadata or "{}")
new_chart_configuration = {}
for config in json_metadata.get("chart_configuration", {}).values():
chart_id = int(config.get("id", 0))