1
0
mirror of https://github.com/aquatix/digimarks.git synced 2025-12-06 22:05:09 +01:00

Find text in url and note too, apart from title

This commit is contained in:
2018-03-23 10:52:09 +01:00
parent fefb317ddf
commit 3c697d3162

View File

@@ -461,8 +461,11 @@ def get_bookmarks(userkey, filtermethod=None, sortmethod=None):
filter_note = True filter_note = True
if filter_text: if filter_text:
bookmarks = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.title.contains(filter_text), bookmarks = Bookmark.select().where(
Bookmark.status == Bookmark.VISIBLE).order_by(Bookmark.created_date.desc()) Bookmark.userkey == userkey,
(Bookmark.title.contains(filter_text) | Bookmark.url.contains(filter_text) | Bookmark.note.contains(filter_text)),
Bookmark.status == Bookmark.VISIBLE
).order_by(Bookmark.created_date.desc())
elif filter_starred: elif filter_starred:
bookmarks = Bookmark.select().where(Bookmark.userkey == userkey, bookmarks = Bookmark.select().where(Bookmark.userkey == userkey,
Bookmark.starred).order_by(Bookmark.created_date.desc()) Bookmark.starred).order_by(Bookmark.created_date.desc())