Skip to content

Commit

Permalink
Fix inn validation
Browse files Browse the repository at this point in the history
  • Loading branch information
smithumble committed Jan 29, 2019
1 parent aa7d30f commit 3c1f0e0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/openprocurement/api/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,9 @@ def validate_cpv_group(items, *args):


def validate_classification_id(items, *args):
allowed_schemes = ['INN', 'ATC']
for item in items:
if item.classification.id.startswith('336'):
schemes = [x.scheme for x in item.additionalClassifications]
if not set(schemes).issubset(set(allowed_schemes)):
raise ValidationError(u'additionalClassification of items wich classification.id starts with 336 \
have to be one of {}'.format(allowed_schemes))
if item.classification.id == '33600000-6':
if schemes.count('INN') != 1:
raise ValidationError(u"Item with classification.id=33600000-6 have to contain exactly one \
Expand Down

0 comments on commit 3c1f0e0

Please sign in to comment.