X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fpostgresqlstorage.cpp;h=d65b4ee0e044fc43eb278433ebfba5b0f62c8b96;hp=143adbb9184008d3fd920a67962f08c54eb53593;hb=c53377c152225754948165f082fe2062a5403dd1;hpb=fbea3b379a5e2a21b343037ac96d106ad1fe5c63 diff --git a/src/core/postgresqlstorage.cpp b/src/core/postgresqlstorage.cpp index 143adbb9..d65b4ee0 100644 --- a/src/core/postgresqlstorage.cpp +++ b/src/core/postgresqlstorage.cpp @@ -546,7 +546,7 @@ NetworkId PostgreSqlStorage::createNetwork(UserId user, const NetworkInfo &info) void PostgreSqlStorage::bindNetworkInfo(QSqlQuery &query, const NetworkInfo &info) { query.bindValue(":networkname", info.networkName); - query.bindValue(":identityid", info.identity.toInt()); + query.bindValue(":identityid", info.identity.isValid() ? info.identity.toInt() : QVariant()); query.bindValue(":encodingcodec", QString(info.codecForEncoding)); query.bindValue(":decodingcodec", QString(info.codecForDecoding)); query.bindValue(":servercodec", QString(info.codecForServer));