diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-14 15:20:19 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-14 15:20:19 +0200 |
commit | 411ad9d4bf3d223eb2eda4baa69253e8c43cc68d (patch) | |
tree | a46ba1e0a1fbb61a2147cb4b31d1068ca14ac290 /common | |
parent | b11f4d47bb833e0cad14b28b036f63a876dd9bc9 (diff) | |
download | sink-411ad9d4bf3d223eb2eda4baa69253e8c43cc68d.tar.gz sink-411ad9d4bf3d223eb2eda4baa69253e8c43cc68d.zip |
Using findLatest with an empty uid is an error.
Seems to be happening sometimes, so that needs to be fixed once we find
the cause.
Diffstat (limited to 'common')
-rw-r--r-- | common/storage/entitystore.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/storage/entitystore.cpp b/common/storage/entitystore.cpp index baea388..638be6e 100644 --- a/common/storage/entitystore.cpp +++ b/common/storage/entitystore.cpp | |||
@@ -483,6 +483,7 @@ void EntityStore::indexLookup(const QByteArray &type, const QByteArray &property | |||
483 | void EntityStore::readLatest(const QByteArray &type, const QByteArray &uid, const std::function<void(const QByteArray &uid, const EntityBuffer &entity)> callback) | 483 | void EntityStore::readLatest(const QByteArray &type, const QByteArray &uid, const std::function<void(const QByteArray &uid, const EntityBuffer &entity)> callback) |
484 | { | 484 | { |
485 | Q_ASSERT(d); | 485 | Q_ASSERT(d); |
486 | Q_ASSERT(!uid.isEmpty()); | ||
486 | auto db = DataStore::mainDatabase(d->getTransaction(), type); | 487 | auto db = DataStore::mainDatabase(d->getTransaction(), type); |
487 | db.findLatest(uid, | 488 | db.findLatest(uid, |
488 | [=](const QByteArray &key, const QByteArray &value) { | 489 | [=](const QByteArray &key, const QByteArray &value) { |