Sfoglia il codice sorgente

updates all cols except created so user and password
of the database can be chaned to no user and password

Maddin-619 6 anni fa
parent
commit
09cd173e92
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      pkg/services/sqlstore/datasource.go

+ 1 - 1
pkg/services/sqlstore/datasource.go

@@ -180,7 +180,7 @@ func UpdateDataSource(cmd *m.UpdateDataSourceCommand) error {
 			updateSession = sess.Where("id=? and org_id=?", ds.Id, ds.OrgId)
 		}
 
-		affected, err := updateSession.Update(ds)
+		affected, err := updateSession.AllCols().Omit("created").Update(ds)
 		if err != nil {
 			return err
 		}