mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-06-16 12:29:00 -04:00
[EGD-3488] Remove incorrect verification of contact numbers received from db
This commit is contained in:
committed by
pawel-mudita
parent
f2f0a79a39
commit
7689f7dd2c
@@ -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()) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user