diff --git a/nonfree/controller/CentralDB.cpp b/nonfree/controller/CentralDB.cpp index ac41250ac..8f4d66c08 100644 --- a/nonfree/controller/CentralDB.cpp +++ b/nonfree/controller/CentralDB.cpp @@ -512,7 +512,7 @@ AuthInfo CentralDB::getSSOAuthInfo(const nlohmann::json& member, const std::stri // check if the member exists first. pqxx::row count = - w.exec("SELECT count(id) FROM network_memberships_ctl WHERE device_id = $1 AND network_id = $2", + w.exec("SELECT count(*) FROM network_memberships_ctl WHERE device_id = $1 AND network_id = $2", pqxx::params { memberId, networkId }) .one_row(); if (count[0].as() == 1) {