Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Remove unused code validator subclass
Browse files Browse the repository at this point in the history
This is just an unneeded specialisation of
ParameterMustBeOneOfTheseValidator.
  • Loading branch information
jabley committed Aug 31, 2014
1 parent 0599928 commit b2522e4
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions backdrop/read/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ def validate_field_value(self, value, request_args, context):
'filter_by must not start with a $')


class ParameterMustBeThisValidator(Validator):
def validate(self, request_args, context):
if context['param_name'] in request_args:
if request_args[context['param_name']] != context['must_be_this']:
self.add_error('Unrecognised grouping for period. '
'Supported periods include: week')


class ParameterMustBeOneOfTheseValidator(Validator):
def validate(self, request_args, context):
param_to_check = context['param_name']
Expand Down

0 comments on commit b2522e4

Please sign in to comment.