code: def value(self):
          
          if self.filter_.get('field') is not None:
              try:
                  result = getattr(self.model, self.filter_['field'])
              except AttributeError:
                  raise InvalidFilters("{} has no attribute {}".format(self.model.__name__, self.filter_['field']))
              else:
                  return result
          else:
              if 'val' not in self.filter_:
                  raise InvalidFilters("Can't find value or field in a filter")
  
              return self.filter_['val']
docs: Get the value to filter on
  
          :return: the value to filter on