diff --git a/core/user.go b/core/user.go index 2cada50..39f0c95 100644 --- a/core/user.go +++ b/core/user.go @@ -252,7 +252,10 @@ func getPopulatedWorks(auditor *audit.Auditor, r *http.Request, user *User, id s var tagsIDs []string // Since category is pre-validated, we don't need to handle unexpected categories - if category == &CategoryAny || category == &CategoryAnyAlt || category == &CategoryIllustration || category == &CategoryManga { + if category.Value == CategoryAny.Value || + category.Value == CategoryAnyAlt.Value || + category.Value == CategoryIllustration.Value || + category.Value == CategoryManga.Value { // Append illustrationIDs and mangaIDs if they are not empty if illustrationIDs != "" { auditor.Logger.Debug("illustrationIDs found, appending to tagsIDs") @@ -262,7 +265,7 @@ func getPopulatedWorks(auditor *audit.Auditor, r *http.Request, user *User, id s auditor.Logger.Debug("mangaIDs found, appending to tagsIDs") tagsIDs = append(tagsIDs, mangaIDs) } - } else if category == &CategoryNovels { + } else if category.Value == CategoryNovels.Value { auditor.Logger.Debug("Using CategoryNovels to fetch tags") if novelIDs != "" { auditor.Logger.Debug("novelIDs found, appending to tagsIDs")