MM-14768: Switches field type from sql.NullBool to a bool pointer. (#10526)

Этот коммит содержится в:
Martin Kraft
2019-03-29 09:42:25 -04:00
коммит произвёл GitHub
родитель a186592257
Коммит 020ba82cdb
4 изменённых файлов: 23 добавлений и 25 удалений

Просмотреть файл

@@ -5,7 +5,6 @@ package model
import (
"crypto/sha1"
"database/sql"
"encoding/hex"
"encoding/json"
"io"
@@ -52,7 +51,7 @@ type Channel struct {
CreatorId string `json:"creator_id"`
SchemeId *string `json:"scheme_id"`
Props map[string]interface{} `json:"props" db:"-"`
GroupConstrained sql.NullBool `json:"group_constrained"`
GroupConstrained *bool `json:"group_constrained"`
}
type ChannelWithTeamData struct {
@@ -191,7 +190,7 @@ func (o *Channel) Patch(patch *ChannelPatch) {
}
if patch.GroupConstrained != nil {
o.GroupConstrained.Bool = *patch.GroupConstrained
o.GroupConstrained = patch.GroupConstrained
}
}