mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-28 21:41:45 -05:00
Delete unused Marshmallow schema validation functions
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from datetime import date, datetime, timedelta
|
||||
from datetime import datetime, timedelta
|
||||
from uuid import UUID
|
||||
|
||||
from flask_marshmallow.fields import fields
|
||||
@@ -40,16 +40,6 @@ def _validate_datetime_not_more_than_96_hours_in_future(dte, msg="Date cannot be
|
||||
raise ValidationError(msg)
|
||||
|
||||
|
||||
def _validate_not_in_past(dte, msg="Date cannot be in the past"):
|
||||
if dte < date.today():
|
||||
raise ValidationError(msg)
|
||||
|
||||
|
||||
def _validate_datetime_not_in_future(dte, msg="Date cannot be in the future"):
|
||||
if dte > datetime.utcnow():
|
||||
raise ValidationError(msg)
|
||||
|
||||
|
||||
def _validate_datetime_not_in_past(dte, msg="Date cannot be in the past"):
|
||||
if dte < datetime.utcnow():
|
||||
raise ValidationError(msg)
|
||||
|
||||
Reference in New Issue
Block a user