mirror of
https://github.com/napnap75/multiarch-docker-images.git
synced 2026-11-16 19:01:48 +01:00
archivist: enum values on the official lists in routes and pipeline
- the config metadata route now serves the official enum vocabularies
read from the documents collection schema (placeholder excluded)
instead of the rule-derived vocabularies (US-31, US-37)
- new superuser-only route POST /api/archivist/fields/{field}/values
registers a value on an enum field's select list, the action behind
the dashboard's add-a-value entry; the template field is refused
- the pipeline and the full correction register new enum values before
the record save validates them
This commit is contained in:
@@ -89,6 +89,12 @@ func processOne(app core.App, cfg *config.Config, s3 *storage.Client, ctx contex
|
||||
}
|
||||
valid := len(errs) == 0 && rendered != ""
|
||||
|
||||
// US-37: new enum values join the official select lists before the
|
||||
// record save validates them.
|
||||
if err := pbapp.EnsureEnumValues(app, cfg, fields); err != nil {
|
||||
return fmt.Errorf("enum values: %w", err)
|
||||
}
|
||||
|
||||
// US-16: the record is created before any physical move.
|
||||
coll, err := app.FindCollectionByNameOrId("documents")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user