From 5e4cf839bcbc2a30fc421dd66232edcc049933a0 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Thu, 5 May 2022 18:04:34 +0200 Subject: [PATCH] Replace "ast" by "json.loads" to handle enums with default values/colors (fix for #2398) --- cps/db.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cps/db.py b/cps/db.py index f4dc4ccb..c4f7ed38 100644 --- a/cps/db.py +++ b/cps/db.py @@ -19,7 +19,6 @@ import os import re -import ast import json from datetime import datetime from urllib.parse import quote @@ -388,7 +387,7 @@ class CustomColumns(Base): normalized = Column(Boolean) def get_display_dict(self): - display_dict = ast.literal_eval(self.display) + display_dict = json.loads(self.display) return display_dict