diff --git a/cps/editbooks.py b/cps/editbooks.py index 99d4f69a..263a69fb 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -1096,6 +1096,7 @@ def table_get_custom_enum(c_id): cc = (calibre_db.session.query(db.Custom_Columns) .filter(db.Custom_Columns.id == c_id) .filter(db.Custom_Columns.datatype.notin_(db.cc_exceptions)).one_or_none()) + ret.append({'value': "", 'text': ""}) for idx, en in enumerate(cc.get_display_dict()['enum_values']): ret.append({'value': en, 'text': en}) return json.dumps(ret) diff --git a/cps/static/js/table.js b/cps/static/js/table.js index d1a32862..0600f0b3 100644 --- a/cps/static/js/table.js +++ b/cps/static/js/table.js @@ -645,6 +645,9 @@ function singlecheckboxFormatter(value, row){ } function ratingFormatter(value, row) { + if (value == 0) { + return ""; + } return (value/2); } diff --git a/cps/templates/book_table.html b/cps/templates/book_table.html index 6f8e8747..fb0cfed8 100644 --- a/cps/templates/book_table.html +++ b/cps/templates/book_table.html @@ -76,7 +76,7 @@ {% if c.datatype == "int" %}