Fix KeeShare entries with references not updating (#11809)

A Entry that gets shared containing a reference Attribute would not write a history entry upon resolving said Attribute resulting in the import into the target database not beeing triggered despite the changes beeing written to the keeshare db.
This commit is contained in:
MNarath 2025-11-02 18:29:14 +01:00 committed by GitHub
parent 9031cb530e
commit a709f14cf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,9 +56,9 @@ namespace
// but those cases with high probability constructed examples and very rare in real usage // but those cases with high probability constructed examples and very rare in real usage
const auto* sourceReference = sourceDb->rootGroup()->findEntryByUuid(targetEntry->uuid()); const auto* sourceReference = sourceDb->rootGroup()->findEntryByUuid(targetEntry->uuid());
const auto resolvedValue = sourceReference->resolveMultiplePlaceholders(standardValue); const auto resolvedValue = sourceReference->resolveMultiplePlaceholders(standardValue);
targetEntry->setUpdateTimeinfo(false); targetEntry->beginUpdate();
targetEntry->attributes()->set(attribute, resolvedValue, targetEntry->attributes()->isProtected(attribute)); targetEntry->attributes()->set(attribute, resolvedValue, targetEntry->attributes()->isProtected(attribute));
targetEntry->setUpdateTimeinfo(true); targetEntry->endUpdate();
} }
} }