web: fix potential panic
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
410d1b97cd
commit
27e4c7027c
|
@ -51,8 +51,8 @@ func (w *Watcher) Check() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, t := range tenants.Results {
|
for _, t := range tenants.Results {
|
||||||
if t.WebCertificate.IsSet() {
|
if kp := t.WebCertificate.Get(); kp != nil {
|
||||||
err := w.cs.AddKeypair(*t.WebCertificate.Get())
|
err := w.cs.AddKeypair(*kp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.log.WithError(err).Warning("failed to add certificate")
|
w.log.WithError(err).Warning("failed to add certificate")
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue