This commit is contained in:
yumoqing 2025-08-13 17:08:44 +08:00
parent 4b278d49b6
commit 680a7c4e6c

View File

@ -173,8 +173,13 @@ class FileMgr:
async def has_sub(self, sor, folderid):
sql = """select unique a.* from folder a
left join folder b on a.id = b.parentid
where a.id=${folderid}$
and b.id is not null
union
select unique a.* from folder a
left join file c on a.id=c.folderid
where id=${folderid}$"""
where a.id=${folderid}$
and b.id is not null"""
recs = await sor.sqlExe(sql, {'folderid':folderid})
if recs:
return True