Skip to content

Commit e80cd7a

Browse files
committedJul 3, 2018
Allow updating SSL cert custom configuration
So far it was only possible to add a first configuration, changing the configuration later on would fail with a unique constraint error.
1 parent ee81016 commit e80cd7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/auth/qgsauthmanager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1937,7 +1937,7 @@ bool QgsAuthManager::storeSslCertCustomConfig( const QgsAuthConfigSslServer &con
19371937
QString certpem( cert.toPem() );
19381938

19391939
QSqlQuery query( authDatabaseConnection() );
1940-
query.prepare( QString( "INSERT INTO %1 (id, host, cert, config) "
1940+
query.prepare( QString( "INSERT OR REPLACE INTO %1 (id, host, cert, config) "
19411941
"VALUES (:id, :host, :cert, :config)" ).arg( authDatabaseServersTable() ) );
19421942

19431943
query.bindValue( QStringLiteral( ":id" ), id );

0 commit comments

Comments
 (0)
Please sign in to comment.