[EGD-3488] Remove incorrect verification of contact numbers received from db

This commit is contained in:
Pawel Olejniczak
2020-08-06 10:05:41 +02:00
committed by pawel-mudita
parent f2f0a79a39
commit 7689f7dd2c
2 changed files with 8 additions and 3 deletions

View File

@@ -307,9 +307,9 @@ ContactRecord ContactRecordInterface::GetByID(uint32_t id)
return rec;
}
std::vector<ContactRecord::Number> nrs = getNumbers(contact.numbersID);
auto nrs = getNumbers(contact.numbersID);
if (nrs.size() == 0) {
return rec;
LOG_DEBUG("Contact record does not contain any numbers.");
}
auto ring = contactDB->ringtones.getById(contact.ringID);
if (!ring.isValid()) {

View File

@@ -1,5 +1,6 @@
#pragma once
#include <log/log.hpp>
#include <cstdint>
constexpr uint32_t DB_ID_NONE = 0;
@@ -10,6 +11,10 @@ struct Record
bool isValid() const
{
return ID != DB_ID_NONE;
auto result = ID != DB_ID_NONE;
if (!result) {
LOG_ERROR("Record validation failed - incorrect ID");
}
return result;
}
};