Improve MineGeo exploration and mapping features
This commit is contained in:
@@ -29,10 +29,11 @@ const dataset = check(
|
||||
);
|
||||
if (
|
||||
dataset.revision_id ||
|
||||
dataset.parent_dataset_id ||
|
||||
!["draft", "review", "rejected", "failed"].includes(dataset.state)
|
||||
)
|
||||
throw new Error(
|
||||
"Only an unpublished, inactive draft can be reprocessed. Published revisions cannot be changed.",
|
||||
"Only an unpublished, inactive original capture can be reprocessed. Published revisions cannot be changed. Contributions cannot be overwritten; upload a new capture instead.",
|
||||
);
|
||||
const job = check(
|
||||
await client.from("upload_jobs").select("*").eq("dataset_id", id).single(),
|
||||
@@ -48,6 +49,14 @@ const input = check(
|
||||
.eq("dataset_id", id)
|
||||
.single(),
|
||||
);
|
||||
if (
|
||||
(input.manifest.availableViewpoints ?? input.manifest.viewpoints).some(
|
||||
(p) => p.assetRoot,
|
||||
)
|
||||
)
|
||||
throw new Error(
|
||||
"This draft contains accepted contributions. Upload a new capture instead of reprocessing mixed media.",
|
||||
);
|
||||
if (dataset.source === "plugin") await prepareAssets();
|
||||
|
||||
// This maintenance command runs with the worker stopped. Compare-and-set
|
||||
|
||||
Reference in New Issue
Block a user