mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-04-11 15:28:44 +01:00
making test more robust
This commit is contained in:
@@ -399,6 +399,12 @@ def photoupload(request, folder=None):
|
||||
message = f'\n !! Permissions failure ?! 0 attempting to mkdir "{(ctx["yearpath"] / newphotographer)}"'
|
||||
print(message)
|
||||
return render(request, "errors/generic.html", {"message": message})
|
||||
# refresh directory listing so the response shows the newly created folder
|
||||
try:
|
||||
dirs = [f.name for f in ctx["yearpath"].iterdir() if f.is_dir()]
|
||||
except FileNotFoundError:
|
||||
dirs = []
|
||||
ctx["dirs"] = sorted(dirs)
|
||||
return ctx
|
||||
|
||||
# else form for uploads / renames
|
||||
|
||||
Reference in New Issue
Block a user