code: def _validate_rel(param, rels):
      
  
      if param.field.count('/') > 1:
          raise InvalidQueryParams(**{
              'detail': 'The filter query param of "%s" is attempting to '
                        'filter on a nested relationship which is not '
                        'currently supported.' % param,
              'links': LINK,
              'parameter': PARAM,
          })
      elif '/' in param.field:
          model_field = param.field.split('/')[0]
  
          if model_field not in rels:
              raise InvalidQueryParams(**{
                  'detail': 'The filter query param of "%s" is attempting to '
                            'filter on a relationship but the "%s" field is '
                            'NOT a relationship field.' % (param, model_field),
                  'links': LINK,
                  'parameter': PARAM,
              })
docs: Validate relationship based filters
  
      We don't support nested filters currently.
  
      FIX: Ensure the relationship filter field exists on the
           relationships model!