mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Automatically associate new service with an org
This is the same thing we do in the admin app at the moment with YAML:
2f4e933b65/app/utils.py (L556-L562)
This commit is contained in:
@@ -51,7 +51,8 @@ from app.models import (
|
||||
Complaint,
|
||||
InvitedUser,
|
||||
TemplateFolder,
|
||||
LetterBranding
|
||||
LetterBranding,
|
||||
Domain,
|
||||
)
|
||||
|
||||
|
||||
@@ -497,6 +498,16 @@ def create_annual_billing(
|
||||
return annual_billing
|
||||
|
||||
|
||||
def create_domain(domain, organisation_id):
|
||||
|
||||
domain = Domain(domain=domain, organisation_id=organisation_id)
|
||||
|
||||
db.session.add(domain)
|
||||
db.session.commit()
|
||||
|
||||
return domain
|
||||
|
||||
|
||||
def create_organisation(name='test_org_1', active=True):
|
||||
data = {
|
||||
'name': name,
|
||||
|
||||
Reference in New Issue
Block a user