From b27391003fb93f47f05b36015f9958f917d31e2c Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 6 Jun 2021 17:20:18 +1000 Subject: [PATCH] fix bug where view import via folder did not have a cwd set, also fixed new bug where toggling from flat to folders with a grouping set would bug out, force grouping=None when folders chosen --- files.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/files.py b/files.py index ecb111b..9a2c289 100644 --- a/files.py +++ b/files.py @@ -140,11 +140,10 @@ def ViewingOptions( request ): cwd='static/Bin' else: folders=False - cwd=None -# folders=True -# cwd='static/Import' + cwd='static/Import' root=cwd + # the above are defaults, if we are here, then we have current values, use them instead if request.method=="POST": noo=request.form['noo'] how_many=request.form['how_many'] @@ -156,6 +155,10 @@ def ViewingOptions( request ): folders=False if request.form['folders'] == "True": folders=True + # have to force grouping to None if we flick to folders from a flat + # view with grouping (otherwise we print out group headings for + # child content that is not in the CWD) + grouping=None cwd = request.form['cwd'] if 'prev' in request.form: