From b898b37e29d3f5762b301bfdba1d23d5758ac86d Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 19 Sep 2022 18:57:55 +0200 Subject: [PATCH 1/3] Fix for #2545 (Max task duration double entry "1hour") --- cps/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/admin.py b/cps/admin.py index b70beab5..89f72189 100755 --- a/cps/admin.py +++ b/cps/admin.py @@ -1310,7 +1310,7 @@ def edit_scheduledtasks(): time_field.append((n, format_time(datetime_time(hour=n), format="short",))) for n in range(5, 65, 5): t = timedelta(hours=n // 60, minutes=n % 60) - duration_field.append((n, format_timedelta(t, threshold=.9))) + duration_field.append((n, format_timedelta(t, threshold=.97))) return render_title_template("schedule_edit.html", config=content, From 67bc23ee0cbbbf4a6b0a9355a689d1961743e271 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Tue, 20 Sep 2022 19:10:45 +0200 Subject: [PATCH 2/3] Fix for #2537 (Impossible to set Denied Column Value from user table) --- cps/static/js/table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/static/js/table.js b/cps/static/js/table.js index 548ca8c4..a758b892 100644 --- a/cps/static/js/table.js +++ b/cps/static/js/table.js @@ -548,11 +548,11 @@ $(function() { }, }); - $("#user-table").on("click-cell.bs.table", function (field, value, row, $element) { + /*$("#user-table").on("click-cell.bs.table", function (field, value, row, $element) { if (value === "denied_column_value") { confirmDialog("btndeluser", "GeneralDeleteModal", $element.id, user_handle); } - }); + });*/ $("#user-table").on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rowsAfter, rowsBefore) { From b4d9e400d99502acd430cee38ad26cf05320555a Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 25 Sep 2022 19:37:38 +0200 Subject: [PATCH 3/3] Handle None as identifier value during upload --- cps/epub.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cps/epub.py b/cps/epub.py index d358d038..00ce907b 100644 --- a/cps/epub.py +++ b/cps/epub.py @@ -102,11 +102,11 @@ def get_epub_info(tmp_file_path, original_file_name, original_file_extension): identifiers = [] for node in p.xpath('dc:identifier', namespaces=ns): - identifier_name=node.attrib.values()[-1]; - identifier_value=node.text; - if identifier_name in ('uuid','calibre'): - continue; - identifiers.append( [identifier_name, identifier_value] ) + identifier_name = node.attrib.values()[-1] + identifier_value = node.text + if identifier_name in ('uuid', 'calibre') or identifier_value is None: + continue + identifiers.append([identifier_name, identifier_value]) if not epub_metadata['title']: title = original_file_name