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

This commit is contained in:
2021-06-06 17:20:18 +10:00
parent 943742df67
commit b27391003f

View File

@@ -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: