Skip double updates if range starts from 0.

This commit is contained in:
Arun Prakash Jana 2016-10-29 01:02:01 +05:30
parent c02651f370
commit d423de0abd
No known key found for this signature in database
GPG Key ID: A75979F35C080412

11
buku
View File

@ -1981,9 +1981,16 @@ if __name__ == '__main__':
upper = int(idx.split('-')[1])
if lower > upper:
lower, upper = upper, lower
for _id in range(lower, upper + 1):
bdb.update_bookmark(_id, new_url, title_manual, tags,
# Update only once if range starts from 0 (all)
if lower == 0:
bdb.update_bookmark(0, new_url, title_manual, tags,
description, append, delete)
else:
for _id in range(lower, upper + 1):
bdb.update_bookmark(_id, new_url, title_manual,
tags, description, append,
delete)
# Search operations
search_results = None