Add and fix ifshort
This commit is contained in:
parent
9390348a65
commit
796072a5a4
6 changed files with 5 additions and 11 deletions
3
db.go
3
db.go
|
@ -105,8 +105,7 @@ func (h *Headscale) setValue(key string, value string) error {
|
|||
Value: value,
|
||||
}
|
||||
|
||||
_, err := h.getValue(key)
|
||||
if err == nil {
|
||||
if _, err := h.getValue(key); err == nil {
|
||||
h.db.Model(&kv).Where("key = ?", key).Update("value", value)
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue