Commit 69be8ef7 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Device: Fix missing WHERE clause

parent a5e88aca
......@@ -68,8 +68,8 @@ bool Device::isPresent() const
void Device::setPresent(bool value)
{
static const std::string req = "UPDATE " + policy::DeviceTable::Name +
" SET is_present = ?";
if ( sqlite::Tools::executeUpdate( m_dbConn, req, value ) == false )
" SET is_present = ? WHERE id_device = ?";
if ( sqlite::Tools::executeUpdate( m_dbConn, req, value, m_id ) == false )
return;
m_isPresent = value;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment