소스 검색

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

Maddin-619 6 년 전
부모
커밋
09cd173e92
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
 		}