Check if content is present before removing
This commit is contained in:
1 parent
12c7ecf0f4
commit
b1ef53873f
1 file changed
+2
@@ -173,6 +173,7 @@ async def list_files(user=Depends(get_verified_user), content: bool = Query(True
|
||||
|
||||
if not content:
|
||||
for file in files:
|
||||
if "content" in file.data:
|
||||
del file.data["content"]
|
||||
|
||||
return files
|
||||
@@ -214,6 +215,7 @@ async def search_files(
|
||||
|
||||
if not content:
|
||||
for file in matching_files:
|
||||
if "content" in file.data:
|
||||
del file.data["content"]
|
||||
|
||||
return matching_files
|
||||
|
||||
Reference in new issue
Block a user