Replace "ast" by "json.loads" to handle enums with default values/colors (fix for #2398)

This commit is contained in:
Ozzie Isaacs 2022-05-05 18:04:34 +02:00
parent 056ecf0d90
commit 5e4cf839bc

View file

@ -19,7 +19,6 @@
import os import os
import re import re
import ast
import json import json
from datetime import datetime from datetime import datetime
from urllib.parse import quote from urllib.parse import quote
@ -388,7 +387,7 @@ class CustomColumns(Base):
normalized = Column(Boolean) normalized = Column(Boolean)
def get_display_dict(self): def get_display_dict(self):
display_dict = ast.literal_eval(self.display) display_dict = json.loads(self.display)
return display_dict return display_dict