From 873997fbbfdee61f9c3be0d1f6513ad0db7cb391 Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Tue, 24 Sep 2019 16:15:46 +0200 Subject: [PATCH] Sort result files for sorted download buttons. --- app/main/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/views.py b/app/main/views.py index 80449e07..c9d6dd64 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -31,7 +31,7 @@ def corpus(corpus_id): 'corpora', str(corpus.id)) files = {} - for file in os.listdir(dir): + for file in sorted(os.listdir(dir)): files[file] = {} files[file]['path'] = os.path.join(file) @@ -110,7 +110,7 @@ def job(job_id): 'jobs', str(job.id)) files = {} - for file in os.listdir(dir): + for file in sorted(os.listdir(dir)): if file == 'output': continue files[file] = {}