mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 02:41:14 -05:00
Remove domain columns from branding table
This relationship is via the `Organisation` now; we don’t use this column to fudge a relationship based on the user’s email address and the matching something in these columns.
This commit is contained in:
@@ -27,7 +27,6 @@ from app.dao.fact_notification_status_dao import (
|
||||
fetch_stats_for_all_services_by_date_range, fetch_monthly_template_usage_for_service
|
||||
)
|
||||
from app.dao.inbound_numbers_dao import dao_allocate_number_for_service
|
||||
from app.dao.letter_branding_dao import dao_get_letter_branding_by_domain
|
||||
from app.dao.organisation_dao import dao_get_organisation_by_service_id
|
||||
from app.dao.service_data_retention_dao import (
|
||||
fetch_service_data_retention,
|
||||
@@ -186,7 +185,8 @@ def create_service():
|
||||
if not data.get('user_id'):
|
||||
errors = {'user_id': ['Missing data for required field.']}
|
||||
raise InvalidRequest(errors, status_code=400)
|
||||
domain = data.pop('service_domain', None)
|
||||
data.pop('service_domain', None)
|
||||
|
||||
# validate json with marshmallow
|
||||
service_schema.load(data)
|
||||
|
||||
@@ -195,8 +195,7 @@ def create_service():
|
||||
# unpack valid json into service object
|
||||
valid_service = Service.from_json(data)
|
||||
|
||||
letter_branding = dao_get_letter_branding_by_domain(domain)
|
||||
dao_create_service(valid_service, user, letter_branding=letter_branding)
|
||||
dao_create_service(valid_service, user)
|
||||
|
||||
return jsonify(data=service_schema.dump(valid_service).data), 201
|
||||
|
||||
|
||||
Reference in New Issue
Block a user