Fix Puppet.Scan()
This commit is contained in:
parent
c4ada14c2f
commit
a893377cc5
1 changed files with 3 additions and 1 deletions
|
@ -77,7 +77,8 @@ type Puppet struct {
|
|||
|
||||
func (puppet *Puppet) Scan(row Scannable) *Puppet {
|
||||
var displayname, avatar sql.NullString
|
||||
err := row.Scan(&puppet.JID, &displayname, &avatar)
|
||||
var quality sql.NullInt64
|
||||
err := row.Scan(&puppet.JID, &avatar, &displayname, &quality)
|
||||
if err != nil {
|
||||
if err != sql.ErrNoRows {
|
||||
puppet.log.Errorln("Database scan failed:", err)
|
||||
|
@ -86,6 +87,7 @@ func (puppet *Puppet) Scan(row Scannable) *Puppet {
|
|||
}
|
||||
puppet.Displayname = displayname.String
|
||||
puppet.Avatar = avatar.String
|
||||
puppet.NameQuality = int8(quality.Int64)
|
||||
return puppet
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue