From 52d53eb90aa0a4fbaab713704f4894e652cb91f3 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Thu, 29 Jul 2021 23:12:51 +0300 Subject: wqflask: views: Filter out approved/ rejected files during display * wqflask/wqflask/views.py (approve_data): Only show files that have not been approved/ rejected. --- wqflask/wqflask/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 4746fcc2..9a961f26 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -1383,8 +1383,9 @@ def display_diffs_admin(): DIFF_DIR = "/tmp/sample-data/diffs" files = [] if os.path.exists(DIFF_DIR): + files = os.listdir(DIFF_DIR) files = filter(lambda x: not(x.endswith((".approved", ".rejected"))), - os.listdir(DIFF_DIR)) + files) return render_template("display_files.html", files=files) -- cgit v1.2.3