fix: cached image fail to refresh (#14081)

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
Jian Qiu
2022-04-20 15:00:35 +08:00
committed by GitHub
co-authored by Qiu Jian
parent 8d5457b79b
commit 89225090ab
+1 -1
View File
@@ -318,7 +318,7 @@ func (manager *SCachedimageManager) GetCachedimageById(ctx context.Context, user
return cachedImage, nil
}
}
if errors.Cause(err) != sql.ErrNoRows {
if err != nil && errors.Cause(err) != sql.ErrNoRows {
return nil, err
}
s := auth.GetAdminSession(ctx, options.Options.Region, "")