scene_pipelines.ingestion.scene.admin.project
Admin helper: ensure a Project catalog row exists.
project_meta_payload
Non-key Project fields. A missing title hashes as an empty string.
ensure_project
ensure_project(project: DjRow[Project], *, deployment: DjRow[Deployment] | None = None, if_exists: DuplicatePolicy = REJECT) -> DjKey[Project]
Insert a project row and stamp the deployment that registered it.
Runs atomically; joins the caller's transaction when one is open.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
DjRow[Project]
|
Full project insert dict ( |
required |
deployment
|
DjRow[Deployment] | None
|
Optional deployment row. If omitted, built from
|
None
|
if_exists
|
DuplicatePolicy
|
Policy when |
REJECT
|
Returns:
| Type | Description |
|---|---|
DjKey[Project]
|
Project primary key |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |