From a2f0fa89d94c62c1f286f8aa122cd69005909ada Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Thu, 10 Mar 2022 10:12:42 +0100 Subject: [PATCH] Add missing inversion of query lookup result Your user exists? Great! It actually does not. Note to self : Unit test SQL --- core/src/db_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/db_manager.cpp b/core/src/db_manager.cpp index 0fd3a4d..193460c 100644 --- a/core/src/db_manager.cpp +++ b/core/src/db_manager.cpp @@ -203,7 +203,7 @@ bool DBManager::deleteUser(QString username) username_exists.addBindValue(username); username_exists.exec(); - if (username_exists.first()) + if (!username_exists.first()) return false; QSqlQuery query;