Do not add duplicate entries

This commit is contained in:
varjolintu 2020-02-04 12:28:26 +02:00 committed by Jonathan White
parent f227a2d529
commit 8dba308d54

View File

@ -610,7 +610,9 @@ BrowserService::searchEntries(const QSharedPointer<Database>& db, const QString&
// Search for additional URL's starting with KP2A_URL // Search for additional URL's starting with KP2A_URL
for (const auto& key : entry->attributes()->keys()) { for (const auto& key : entry->attributes()->keys()) {
if (key.startsWith(ADDITIONAL_URL) && handleURL(entry->attributes()->value(key), url, submitUrl)) { if (key.startsWith(ADDITIONAL_URL) &&
handleURL(entry->attributes()->value(key), url, submitUrl) &&
!entries.contains(entry)) {
entries.append(entry); entries.append(entry);
continue; continue;
} }