Fix deserialization multiaccounts
This commit is contained in:
parent
4c993a8610
commit
23c9618b0e
|
@ -93,10 +93,12 @@ func (db *Database) GetAccounts() (rst []Account, err error) {
|
||||||
acc.Timestamp = accLoginTimestamp.Int64
|
acc.Timestamp = accLoginTimestamp.Int64
|
||||||
acc.Identicon = accIdenticon.String
|
acc.Identicon = accIdenticon.String
|
||||||
acc.ColorID = accColorID.Int64
|
acc.ColorID = accColorID.Int64
|
||||||
|
if len(accColorHash.String) != 0 {
|
||||||
err = json.Unmarshal([]byte(accColorHash.String), &acc.ColorHash)
|
err = json.Unmarshal([]byte(accColorHash.String), &acc.ColorHash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ii.KeyUID = acc.KeyUID
|
ii.KeyUID = acc.KeyUID
|
||||||
ii.Name = iiName.String
|
ii.Name = iiName.String
|
||||||
|
|
Loading…
Reference in New Issue