Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[libcontacts] Do not attempt to remove IsNot relationships during merge
We can't be certain that they exist, and if not, they cause the pre-
existing aggregation relationships to be preserved.
  • Loading branch information
matthewvogt committed Aug 26, 2014
1 parent d6b3116 commit 1707297
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/seasidecache.cpp
Expand Up @@ -3057,8 +3057,10 @@ void SeasideCache::completeContactAggregation(const QContactId &contact1Id, cons
m_relationshipsToSave.append(makeRelationship(aggregateRelationshipType, contact1Id, constituentId));
m_relationshipsToRemove.append(makeRelationship(aggregateRelationshipType, contact2Id, constituentId));

// If there is an existing IsNot relationship, remove that
m_relationshipsToRemove.append(makeRelationship(isNotRelationshipType, contact1Id, constituentId));
// If there is an existing IsNot relationship, it would be better to remove it;
// unfortunately, we can't be certain that it exists, and if it does not, the
// relationship removal will fail - hence, better to ignore the possibility:
//m_relationshipsToRemove.append(makeRelationship(isNotRelationshipType, contact1Id, constituentId));
}

if (!m_relationshipsToSave.isEmpty() || !m_relationshipsToRemove.isEmpty())
Expand Down

0 comments on commit 1707297

Please sign in to comment.