Add check in compactDB for number of records.
This commit is contained in:
parent
f4534992de
commit
fbc8d25a89
3
buku
3
buku
@ -561,6 +561,9 @@ def compactDB(conn, cur, index):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
cur.execute('SELECT MAX(id) from bookmarks')
|
cur.execute('SELECT MAX(id) from bookmarks')
|
||||||
|
if cur.rowcount < 1:
|
||||||
|
return
|
||||||
|
|
||||||
results = cur.fetchall()
|
results = cur.fetchall()
|
||||||
for row in results:
|
for row in results:
|
||||||
if row[0] > index:
|
if row[0] > index:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user