def is_valid_model_filters(model, filters, exclude_list=None):
 for key in filters.keys():
  if (exclude_list and (key in exclude_list)):
   continue
  try:
   getattr(model, key)
  except AttributeError:
   LOG.debug("'%s' filter key is not valid.", key)
   return False
 return True

def is_valid_model_filters ( model , filters , exclude_list = None ) : for key in filters . keys ( ) : if ( exclude_list and ( key in exclude_list ) ) : continue try : getattr ( model , key ) except AttributeError : LOG . debug ( "'%s' filter key is not valid." , key ) return False return True
return true if filter values exist on the model .