Replace remaining GetMaster() queries (#19545)
There are still some remaining which access the raw DB struct. There will be a separate PR to clean those up. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
256427f7f9
Коммит
678c7d3b8c
@@ -821,7 +821,8 @@ func TestCreatePost(t *testing.T) {
|
||||
|
||||
sqlStore := th.GetSqlStore()
|
||||
sql := fmt.Sprintf("select count(*) from Posts where Id = '%[1]s' or OriginalId = '%[1]s';", previewPost.Id)
|
||||
val, err2 := sqlStore.GetMaster().SelectInt(sql)
|
||||
var val int64
|
||||
err2 := sqlStore.GetMasterX().Get(&val, sql)
|
||||
require.NoError(t, err2)
|
||||
|
||||
require.EqualValues(t, int64(1), val)
|
||||
|
||||
Ссылка в новой задаче
Block a user