0001-mdph13-only-validate-valued-date-fields.patch
passerelle/contrib/mdph13/models.py | ||
---|---|---|
157 | 157 | |
158 | 158 |
def check(value, path): |
159 | 159 |
if path[-1].startswith('date_'): |
160 |
if (not isinstance(value, six.text_type)
|
|
161 |
or not self.DATE_RE.match(value)):
|
|
160 |
if (isinstance(value, six.text_type) |
|
161 |
and not self.DATE_RE.match(value)):
|
|
162 | 162 |
errors.append('%s is not a date string' % '.'.join(path)) |
163 | 163 |
json_walker(data, check) |
164 | 164 |
if errors: |
165 |
- |