Skip to content

Commit 494e2a8

Browse files
committed
gwy: relaxed trailing slash for file listing / search
1 parent 7bed7db commit 494e2a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gateway/sds_gateway/api_methods/views/file_endpoints.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,10 @@ def list(self, request: Request) -> Response:
256256
inferred_user_rel_path = user_rel_path.parent
257257
exact_match_query = all_valid_user_owned_files.filter(
258258
name=basename,
259-
directory=str(inferred_user_rel_path) + "/",
259+
directory__in=[
260+
str(inferred_user_rel_path),
261+
str(inferred_user_rel_path) + "/",
262+
],
260263
).order_by(
261264
"-created_at",
262265
)[

0 commit comments

Comments
 (0)