changeset 3630:2467e619cf67 configuration

Fixed more SQL typos.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 11 Jun 2019 12:38:25 +0200
parents 1825a1bc9fb1
children 9709081719ae
files pkg/controllers/system.go
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/system.go	Tue Jun 11 12:17:47 2019 +0200
+++ b/pkg/controllers/system.go	Tue Jun 11 12:38:25 2019 +0200
@@ -40,7 +40,7 @@
 FROM sys_admin.system_config`
 
 	updateSettingSQL = `
-INSERT INTO system_admin.system_config (config_key, config_val)
+INSERT INTO sys_admin.system_config (config_key, config_val)
 VALUES ($1, $2)
 ON CONFLICT (config_key) DO UPDATE SET config_val = $2`
 )
@@ -161,11 +161,7 @@
 	defer setStmt.Close()
 
 	for key, value := range *settings {
-		if _, err = setStmt.ExecContext(
-			ctx,
-			updateSettingSQL,
-			key, value,
-		); err != nil {
+		if _, err = setStmt.ExecContext(ctx, key, value); err != nil {
 			return
 		}
 	}