mirror of
https://github.com/GSA/notifications-api.git
synced 2026-03-26 05:02:45 -04:00
unused schema
This commit is contained in:
@@ -465,30 +465,6 @@ class OrganisationSchema(BaseSchema):
|
||||
strict = True
|
||||
|
||||
|
||||
class FromToDateSchema(ma.Schema):
|
||||
|
||||
class Meta:
|
||||
strict = True
|
||||
|
||||
date_from = fields.Date()
|
||||
date_to = fields.Date()
|
||||
|
||||
@validates('date_from')
|
||||
def validate_date_from(self, value):
|
||||
_validate_not_in_future(value)
|
||||
|
||||
@validates('date_to')
|
||||
def validate_date_to(self, value):
|
||||
_validate_not_in_future(value)
|
||||
|
||||
@validates_schema
|
||||
def validate_dates(self, data):
|
||||
df = data.get('date_from')
|
||||
dt = data.get('date_to')
|
||||
if (df and dt) and (df > dt):
|
||||
raise ValidationError("date_from needs to be greater than date_to")
|
||||
|
||||
|
||||
class DaySchema(ma.Schema):
|
||||
|
||||
class Meta:
|
||||
@@ -541,7 +517,6 @@ api_key_history_schema = ApiKeyHistorySchema()
|
||||
template_history_schema = TemplateHistorySchema()
|
||||
event_schema = EventSchema()
|
||||
organisation_schema = OrganisationSchema()
|
||||
from_to_date_schema = FromToDateSchema()
|
||||
provider_details_schema = ProviderDetailsSchema()
|
||||
day_schema = DaySchema()
|
||||
unarchived_template_schema = UnarchivedTemplateSchema()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from datetime import date, timedelta
|
||||
|
||||
from flask import (
|
||||
jsonify,
|
||||
request,
|
||||
@@ -32,7 +30,6 @@ from app.schemas import (
|
||||
service_schema,
|
||||
api_key_schema,
|
||||
user_schema,
|
||||
from_to_date_schema,
|
||||
permission_schema,
|
||||
notification_with_template_schema,
|
||||
notifications_filter_schema,
|
||||
|
||||
Reference in New Issue
Block a user