From edb6018c8f04d3ec1e7502dcb09ed05dc17742b3 Mon Sep 17 00:00:00 2001
From: Thomas Kluyver <thomas@kluyver.me.uk>
Date: Mon, 20 Jul 2020 16:40:41 +0100
Subject: [PATCH] Sort the thing I meant to sort

---
 xfel_calibrate/finalize.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xfel_calibrate/finalize.py b/xfel_calibrate/finalize.py
index 92f833783..53bc72912 100644
--- a/xfel_calibrate/finalize.py
+++ b/xfel_calibrate/finalize.py
@@ -273,7 +273,7 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
             return len(lead_rstfiles) + 1, f
         else:
             return len(lead_rstfiles) + 2, f
-    lead_rstfiles.sort(key=sort_key)
+    direntries.sort(key=sort_key)
 
     files_to_handle = []
     for entry in direntries:
-- 
GitLab