From 1366b36c32fe721c4336b0b0e4685870f97e03bd Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Thu, 25 May 2017 08:20:19 +0200 Subject: [PATCH] Added integer-field to supported custom colums --- cps/templates/book_edit.html | 2 +- cps/web.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index a24f74b5..6651ce22 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -70,7 +70,7 @@ {% endif %} {% if c.datatype == 'int' %} - + {% endif %} {% if c.datatype in ['text', 'series'] and not c.is_multiple %} diff --git a/cps/web.py b/cps/web.py index e13ecca0..6f5dd8f9 100755 --- a/cps/web.py +++ b/cps/web.py @@ -1313,7 +1313,7 @@ def delete_book(book_id): cc_string = "custom_column_" + str(c.id) if not c.is_multiple: if len(getattr(book, cc_string)) > 0: - if c.datatype == 'bool': + if c.datatype == 'bool' or c.datatype == 'integer': del_cc = getattr(book, cc_string)[0] getattr(book, cc_string).remove(del_cc) db.session.delete(del_cc)