Skip to content

Commit 7f50185

Browse files
committed
Fix 500 error
When the users logs out in one tab, then in another (previously loaded) tab clicks on shared or personal.
1 parent 8ec8827 commit 7f50185

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

caterva2/utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ def walk_files(root, exclude=None):
5050
if exclude is None:
5151
exclude = set()
5252

53-
for path in root.glob("**/*"):
54-
if path.is_file():
55-
relpath = path.relative_to(root)
56-
if str(relpath) not in exclude:
57-
yield path, relpath
53+
if root is not None:
54+
for path in root.glob("**/*"):
55+
if path.is_file():
56+
relpath = path.relative_to(root)
57+
if str(relpath) not in exclude:
58+
yield path, relpath
5859

5960

6061
def iterdir(root):

0 commit comments

Comments
 (0)