handle null in result set

This commit is contained in:
Grant Limberg 2021-06-04 15:15:42 -07:00
parent add33f1ab3
commit fd85f87ade
No known key found for this signature in database
GPG Key ID: 2BA62CCABBB4095A

View File

@ -696,7 +696,7 @@ void PostgreSQL::initializeMembers()
"WHERE e.network_id = $1 AND e.member_id = $2 AND n.sso_enabled = TRUE "
"ORDER BY e.authentication_expiry_time LIMIT 1", networkId, memberId);
if (authRes.size() == 1) {
if (authRes.size() == 1 && !authRes.at(0)[0].is_null()) {
// there is an expiry time record
config["authenticationExpiryTime"] = authRes.at(0)[0].as<int64_t>();
}