From 6ac65cf89332a1f8d387518e116538293cfd3b75 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Wed, 17 Mar 2021 20:58:25 +0000 Subject: [PATCH] Buxfix for cave search not finding any cave file --- core/views_survex.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/views_survex.py b/core/views_survex.py index 79817c9..43b9b5b 100644 --- a/core/views_survex.py +++ b/core/views_survex.py @@ -337,10 +337,8 @@ def survexcaveslist(request): elif len(survdirobj) > 1: multifilecaves.append((survdirobj[0], survdirobj[1:])) # single file caves - else: - #print("survdirobj = ") - #print(survdirobj) - onefilecaves.append(survdirobj[0]) + elif len(survdirobj) == 1: + onefilecaves.append(survdirobj[0]) return render_to_response('svxfilecavelist.html', {'settings': settings, "onefilecaves":onefilecaves, "multifilecaves":multifilecaves, "subdircaves":subdircaves })