progress on removing postage

This commit is contained in:
stvnrlly
2023-02-10 15:04:59 -05:00
parent 590b3356a1
commit ff3f2c06c0
40 changed files with 189 additions and 798 deletions

View File

@@ -239,7 +239,6 @@ post_precompiled_letter_request = {
"properties": {
"reference": {"type": "string"},
"content": {"type": "string"},
"postage": {"type": "string", "format": "postage"}
},
"required": ["reference", "content"],
"additionalProperties": False

View File

@@ -43,7 +43,6 @@ from app.notifications.validators import (
check_service_email_reply_to_id,
check_service_has_permission,
check_service_sms_sender_id,
validate_address,
validate_and_format_recipient,
validate_template,
)
@@ -326,8 +325,6 @@ def process_letter_notification(
if not service.research_mode and service.restricted and api_key.key_type != KEY_TYPE_TEST:
raise BadRequestError(message='Cannot send letters when service is in trial mode', status_code=403)
postage = validate_address(service, letter_data['personalisation'])
test_key = api_key.key_type == KEY_TYPE_TEST
status = NOTIFICATION_CREATED
@@ -347,8 +344,7 @@ def process_letter_notification(
api_key=api_key,
status=status,
reply_to_text=reply_to_text,
updated_at=updated_at,
postage=postage
updated_at=updated_at
)
resp = create_response_for_post_notification(