def remove_invalid_filter_options(context, filters, allowed_search_options):
 if context.is_admin:
  return
 unknown_options = [opt for opt in filters if (opt not in allowed_search_options)]
 bad_options = ', '.join(unknown_options)
 LOG.debug("Removing options '%s' from query.", bad_options)
 for opt in unknown_options:
  del filters[opt]

def remove_invalid_filter_options ( context , filters , allowed_search_options ) : if context . is_admin : return unknown_options = [ opt for opt in filters if ( opt not in allowed_search_options ) ] bad_options = ', ' . join ( unknown_options ) LOG . debug ( "Removing options '%s' from query." , bad_options ) for opt in unknown_options : del filters [ opt ]
remove search options that are not valid for non-admin api/context .