Change schema format name of datetime format

Renamed the 'datetime' format to 'datetime_within_next_day'. This format
is used to validate the date and time of scheduled notifications, not to
check the format of a datetime.
This commit is contained in:
Katie Smith
2018-06-12 12:18:33 +01:00
parent 7f4b828aff
commit 8c22a6afda
2 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ def validate(json_to_validate, schema):
validate_email_address(instance)
return True
@format_checker.checks('datetime', raises=ValidationError)
@format_checker.checks('datetime_within_next_day', raises=ValidationError)
def validate_schema_date_with_hour(instance):
if isinstance(instance, str):
try: