File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,12 @@ async def get_recommended_labelset_query(
8181 # .order_by(Work.id, CollectionItem.copies_available.desc())
8282 )
8383
84- if hues is not None :
84+ if hues is not None and len ( hues ) > 0 :
8585 # Labelset Ids from hues
8686 hue_ids_query = select (Hue .id ).where (Hue .key .in_ (hues ))
8787 query = query .where (LabelSetHue .hue_id .in_ (hue_ids_query ))
8888
89- if reading_abilities is not None :
89+ if reading_abilities is not None and len ( reading_abilities ) > 0 :
9090 # Labelset Ids from reading abilities
9191 reading_ability_ids_query = select (ReadingAbility .id ).where (
9292 ReadingAbility .key .in_ (reading_abilities )
@@ -110,7 +110,7 @@ async def get_recommended_labelset_query(
110110 # query = query.filter(~Edition.cover_url.contains("/open/"))
111111
112112 # exclude certain editions using isbn
113- if exclude_isbns is not None :
113+ if exclude_isbns is not None and len ( exclude_isbns ) > 0 :
114114 query = query .where (~ Edition .isbn .in_ (exclude_isbns ))
115115
116116 # Now make a massive CTE so we can shuffle the results
You can’t perform that action at this time.
0 commit comments