mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 09:29:49 -04:00
send organisation back in correct variable
This commit is contained in:
@@ -283,7 +283,7 @@ def service_set_branding_and_org(service_id):
|
|||||||
service_api_client.update_service(
|
service_api_client.update_service(
|
||||||
service_id,
|
service_id,
|
||||||
branding=form.branding_type.data,
|
branding=form.branding_type.data,
|
||||||
organisation_id=organisation
|
organisation=organisation
|
||||||
)
|
)
|
||||||
return redirect(url_for('.service_settings', service_id=service_id))
|
return redirect(url_for('.service_settings', service_id=service_id))
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class ServiceAPIClient(NotificationsAPIClient):
|
|||||||
'sms_sender',
|
'sms_sender',
|
||||||
'created_by',
|
'created_by',
|
||||||
'branding',
|
'branding',
|
||||||
'organisation_id'
|
'organisation'
|
||||||
}
|
}
|
||||||
if disallowed_attributes:
|
if disallowed_attributes:
|
||||||
raise TypeError('Not allowed to update service attributes: {}'.format(
|
raise TypeError('Not allowed to update service attributes: {}'.format(
|
||||||
|
|||||||
@@ -782,9 +782,9 @@ def test_should_show_branding_and_organisations(
|
|||||||
page.find('input', attrs={"id": "branding_type-2"})['checked']
|
page.find('input', attrs={"id": "branding_type-2"})['checked']
|
||||||
|
|
||||||
assert page.find('label', attrs={"for": "organisation-1"}).text.strip() == 'None'
|
assert page.find('label', attrs={"for": "organisation-1"}).text.strip() == 'None'
|
||||||
with pytest.raises(KeyError):
|
assert page.find('input', attrs={"id": "organisation-1"})['value'] == 'None'
|
||||||
page.find('input', attrs={"id": "organisation-1"})['value']
|
|
||||||
assert page.find('label', attrs={"for": "organisation-2"}).text.strip() == 'Organisation name'
|
assert page.find('label', attrs={"for": "organisation-2"}).text.strip() == 'Organisation name'
|
||||||
|
assert page.find('input', attrs={"id": "organisation-2"})['value'] == 'organisation-name'
|
||||||
assert page.find('label', attrs={"for": "organisation-2"}).find('img')['src'] == (
|
assert page.find('label', attrs={"for": "organisation-2"}).find('img')['src'] == (
|
||||||
'/static/images/email-template/crests/example.png'
|
'/static/images/email-template/crests/example.png'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user