Skip to content

Commit

Permalink
fix: create odk projects with prepended 'FMTM xxx' to identify
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Feb 26, 2024
1 parent a51e6be commit 1f54e23
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/backend/app/central/central_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,15 @@ def list_odk_projects(
def create_odk_project(
name: str, odk_central: Optional[project_schemas.ODKCentralDecrypted] = None
):
"""Create a project on a remote ODK Server."""
"""Create a project on a remote ODK Server.
Appends FMTM to the project name to help identify on shared servers.
"""
project = get_odk_project(odk_central)

try:
log.debug("Attempting ODKCentral project creation")
result = project.createProject(name)
log.debug(f"Attempting ODKCentral project creation: FMTM {name}")
result = project.createProject(f"FMTM {name}")

# Sometimes createProject returns a list if fails
if isinstance(result, dict):
Expand Down

0 comments on commit 1f54e23

Please sign in to comment.