diff --git a/src/backend/app/organisations/organisation_deps.py b/src/backend/app/organisations/organisation_deps.py index cf3b81351e..6db119e028 100644 --- a/src/backend/app/organisations/organisation_deps.py +++ b/src/backend/app/organisations/organisation_deps.py @@ -85,9 +85,9 @@ async def get_org_odk_creds( ) return central_schemas.ODKCentralDecrypted( - odk_central_url=org.odk_central_url, - odk_central_user=org.odk_central_user, - odk_central_password=org.odk_central_password, + odk_central_url=url, + odk_central_user=user, + odk_central_password=password, ) diff --git a/src/backend/app/organisations/organisation_schemas.py b/src/backend/app/organisations/organisation_schemas.py index cc8f86581d..d32e3a8aff 100644 --- a/src/backend/app/organisations/organisation_schemas.py +++ b/src/backend/app/organisations/organisation_schemas.py @@ -79,20 +79,16 @@ def parse_organisation_input( The parsed data is returned as an OrganisationIn instance, with the ODKCentralIn fields merged in. """ - odk_central_data = ODKCentralIn( - odk_central_url=odk_central_url, - odk_central_user=odk_central_user, - odk_central_password=odk_central_password, - ) - org_data = OrganisationUpdate( + return OrganisationUpdate( name=name, slug=slug, created_by=created_by, community_type=community_type, type=type, - **odk_central_data.dict(exclude_unset=True), + odk_central_url=odk_central_url, + odk_central_user=odk_central_user, + odk_central_password=odk_central_password, ) - return org_data class OrganisationOut(BaseModel):