Merge commit from fork

This commit is contained in:
Caio Cotts
2025-05-28 19:00:20 -04:00
committed by GitHub
parent 175964b17a
commit b19d5f0d3e
2 changed files with 28 additions and 1 deletions
+6 -1
View File
@@ -129,7 +129,12 @@ func NewArtistRepository(ctx context.Context, db dbx.Builder) model.ArtistReposi
}
func roleFilter(_ string, role any) Sqlizer {
return NotEq{fmt.Sprintf("stats ->> '$.%v'", role): nil}
if role, ok := role.(string); ok {
if _, ok := model.AllRoles[role]; ok {
return NotEq{fmt.Sprintf("stats ->> '$.%v'", role): nil}
}
}
return Eq{"1": 2}
}
func (r *artistRepository) selectArtist(options ...model.QueryOptions) SelectBuilder {