'Get the appropriate depth.  No provided value will be treated as a
depth of 0, while a value of "all" will be treated as unlimited depth.'

def clean_depth(self):

    value = self.cleaned_data['depth']
    if (not value):
        return 0
    elif (value == 'all'):
        return None
    try:
        return int(value)
    except ValueError:
        raise ValidationError("'{}'    is    not    a    valid    depth    value.".format(value))
