1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-24 18:47:23 +00:00

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 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