fix: cartesian product warning in delete_folder (#4224)

This commit is contained in:
dhlidongming 2024-10-31 09:12:08 +08:00 committed by GitHub
commit c7fed78181
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -213,7 +213,7 @@ async def delete_folder(
current_user: CurrentActiveUser,
):
try:
flows = session.exec(select(Flow).where(Flow.folder_id == folder_id, Folder.user_id == current_user.id)).all()
flows = session.exec(select(Flow).where(Flow.folder_id == folder_id, Flow.user_id == current_user.id)).all()
if len(flows) > 0:
for flow in flows:
await cascade_delete_flow(session, flow)