mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-15 07:18:58 -04:00
Rename model to AllOrganisations
This makes it clearer that this model collection isn’t the organisations for a user or a service or some other entity, like most model collections are. It will also lets us make a separate Organisations model, without the name conflicting.
This commit is contained in:
@@ -41,7 +41,7 @@ from app.main.views.dashboard import (
|
||||
requested_and_current_financial_year,
|
||||
)
|
||||
from app.main.views.service_settings import get_branding_as_value_and_label
|
||||
from app.models.organisation import Organisation, Organisations
|
||||
from app.models.organisation import AllOrganisations, Organisation
|
||||
from app.models.user import InvitedOrgUser, User
|
||||
from app.utils.user import user_has_permissions, user_is_platform_admin
|
||||
|
||||
@@ -51,7 +51,7 @@ from app.utils.user import user_has_permissions, user_is_platform_admin
|
||||
def organisations():
|
||||
return render_template(
|
||||
'views/organisations/index.html',
|
||||
organisations=Organisations(),
|
||||
organisations=AllOrganisations(),
|
||||
search_form=SearchByNameForm(),
|
||||
)
|
||||
|
||||
@@ -116,7 +116,7 @@ def add_organisation_from_nhs_local_service(service_id):
|
||||
|
||||
form = AddNHSLocalOrganisationForm(organisation_choices=[
|
||||
(organisation.id, organisation.name)
|
||||
for organisation in Organisations()
|
||||
for organisation in AllOrganisations()
|
||||
if organisation.organisation_type == Organisation.TYPE_NHS_LOCAL
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user