flip_api.private_services.project_images_helpers

Functions

update_status(→ int)

Update the status of an existing XNAT project

insert_status(→ int)

Insert a new XNAT project status record

Module Contents

flip_api.private_services.project_images_helpers.update_status(trust_id: uuid.UUID, xnat_project_id: uuid.UUID, project_id: uuid.UUID, status: flip_api.db.models.main_models.XNATImageStatus, db: sqlmodel.Session) int

Update the status of an existing XNAT project

Parameters:
  • trust_id (str) – ID of the trust

  • xnat_project_id (str) – ID of the XNAT project

  • project_id (str) – ID of the project

  • status (XNATImageStatus) – Status to set

  • db (Session) – Database session

Returns:

Number of rows updated

Return type:

int

flip_api.private_services.project_images_helpers.insert_status(trust_id: uuid.UUID, xnat_project_id: uuid.UUID, project_id: uuid.UUID, status: flip_api.db.models.main_models.XNATImageStatus, db: sqlmodel.Session, query_id: uuid.UUID | None = None) int

Insert a new XNAT project status record

Parameters:
  • trust_id (str) – ID of the trust

  • xnat_project_id (str) – ID of the XNAT project

  • project_id (str) – ID of the project

  • status (XNATImageStatus) – Status to set

  • db (Session) – Database session

  • query_id (str | None) – Optional query ID

Returns:

Number of rows inserted

Return type:

int