fix bug
This commit is contained in:
parent
8dded98f39
commit
729da0495d
2
internal/pkg/cache/headerImages.go
vendored
2
internal/pkg/cache/headerImages.go
vendored
|
@ -20,7 +20,7 @@ func getHeaderImages(a ...any) (r []models.PostThumbnail, err error) {
|
||||||
ctx := a[0].(context.Context)
|
ctx := a[0].(context.Context)
|
||||||
theme := a[1].(string)
|
theme := a[1].(string)
|
||||||
meta, err := wpconfig.GetThemeMods(theme)
|
meta, err := wpconfig.GetThemeMods(theme)
|
||||||
if err != nil && meta.HeaderImage != "" {
|
if err == nil && meta.HeaderImage != "" {
|
||||||
if "random-uploaded-image" == meta.HeaderImage {
|
if "random-uploaded-image" == meta.HeaderImage {
|
||||||
headers, er := model.Finds[models.Posts](ctx, model.Conditions(
|
headers, er := model.Finds[models.Posts](ctx, model.Conditions(
|
||||||
model.Where(model.SqlBuilder{
|
model.Where(model.SqlBuilder{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user