bugfix: filter flows on folder to ensure is displaying only for the logged user (#2897)
* 🐛 (generalBugs-shard-5.spec.ts): fix test to wait for elements to be interactable before performing actions to prevent flakiness * 🐛 (folders.py): fix issue where all flows were being returned instead of only flows from the current user in the specified folder
This commit is contained in:
parent
b7bc36d32a
commit
7ffcdd2b68
1 changed files with 2 additions and 0 deletions
|
|
@ -107,6 +107,8 @@ def read_folder(
|
|||
folder = session.exec(select(Folder).where(Folder.id == folder_id, Folder.user_id == current_user.id)).first()
|
||||
if not folder:
|
||||
raise HTTPException(status_code=404, detail="Folder not found")
|
||||
flows_from_current_user_in_folder = [flow for flow in folder.flows if flow.user_id == current_user.id]
|
||||
folder.flows = flows_from_current_user_in_folder
|
||||
return folder
|
||||
except Exception as e:
|
||||
if "No result found" in str(e):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue