add handling of missing QR

This commit is contained in:
Maxim Kochurov 2022-03-13 13:12:13 +00:00
parent e89f7d31d1
commit ec6f0b7506
3 changed files with 15 additions and 8 deletions

View file

@ -155,7 +155,7 @@ func (o *JsonDB) GetClients(hasQRCode bool) ([]model.ClientData, error) {
}
// generate client qrcode image in base64
if hasQRCode {
if hasQRCode && client.PrivateKey != "" {
server, _ := o.GetServer()
globalSettings, _ := o.GetGlobalSettings()
@ -185,7 +185,7 @@ func (o *JsonDB) GetClientByID(clientID string, hasQRCode bool) (model.ClientDat
}
// generate client qrcode image in base64
if hasQRCode {
if hasQRCode && client.PrivateKey != "" {
server, _ := o.GetServer()
globalSettings, _ := o.GetGlobalSettings()