Permalink
Browse files

Added check for missing header to schema validation in python API.

  • Loading branch information...
javh committed Jan 30, 2019
1 parent 629bb6c commit 82a81e2f52bd4ac5b61059c7ea2d9301c6ce596c
Showing with 4 additions and 0 deletions.
  1. +4 −0 lang/python/airr/schema.py
@@ -238,6 +238,10 @@ def validate_header(self, header):
Raises:
airr.ValidationError: raised if header fails validation.
"""
# Check for missing header
if header is None:
raise ValidationError('missing header')

# Check required fields
missing_fields = [f for f in self.required if f not in header]

0 comments on commit 82a81e2

Please sign in to comment.