Fix mistake in getting puppets with unknown phone number
This commit is contained in:
parent
6fca366d6a
commit
8ab8504023
1 changed files with 3 additions and 3 deletions
|
@ -67,10 +67,10 @@ func (br *GMBridge) GetPuppetByKey(key database.Key, phone string) *Puppet {
|
|||
br.ZLog.Err(err).Object("puppet_key", key).Msg("Failed to get puppet from database")
|
||||
return nil
|
||||
}
|
||||
if dbPuppet == nil {
|
||||
if phone == "" {
|
||||
return nil
|
||||
}
|
||||
if dbPuppet == nil {
|
||||
dbPuppet = br.DB.Puppet.New()
|
||||
dbPuppet.Key = key
|
||||
dbPuppet.Phone = phone
|
||||
|
|
Loading…
Reference in a new issue