1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-22 17:06:17 +00:00

Don't bulk delete folders

Fixes issue with MariaDB<10.3.1
Ref #99
This commit is contained in:
spl0k 2018-05-20 13:14:28 +02:00
parent af50e8bf91
commit a7cdeb0b2d

View File

@ -107,7 +107,7 @@ class Folder(PathMixin, db.Entity):
not exists(f for f in Folder if f.parent == self) and not self.root) not exists(f for f in Folder if f.parent == self) and not self.root)
total = 0 total = 0
while True: while True:
count = query.delete(bulk = True) count = query.delete() # Non-bulk, MariaDB<10.3.1 doesn't like it
total += count total += count
if not count: if not count:
return total return total