paperless-ngx: an empty barcodes block falls back to the chart defaults
A "barcodes:" key left without children (e.g. after deleting the last remaining sub-key, PAPERLESS_CONSUMER_BARCODE_SCANNER, which paperless-ngx 3.0 removed) is YAML null and replaced the whole default sub-tree on merge. Rendering then failed on the nil pointer, so the release simply stopped updating. An empty or null block now means "the chart defaults apply". The merge runs through a new paperless-ngx.defaultedDict helper: nulls never delete, nested maps merge recursively, and explicitly set values win - including false and 0, which "default" and "mergeOverwrite" would swallow. A scalar where the defaults define a map is rejected with the values path in the message. Major bump: the meaning of a values override changes. Fixes #61
This commit is contained in:
5 files changed
+99
-5
No files matched your search
@@ -48,6 +48,13 @@ paperless:
|
||||
# The barcode scanner backend is no longer configurable: paperless-ngx 3.0
|
||||
# removed pyzbar and PAPERLESS_CONSUMER_BARCODE_SCANNER; zxing-cpp is the
|
||||
# only backend now.
|
||||
#
|
||||
# An empty or null "barcodes:" block in an override means "the defaults
|
||||
# below apply" — the chart merges the block onto these defaults instead of
|
||||
# letting a childless key erase them (issue #61; the fallback copy lives in
|
||||
# the paperless-ngx.barcodes helper and is kept in sync with this block).
|
||||
# To switch barcode handling off, set barcodes.enabled: false explicitly;
|
||||
# deleting the sub-keys does not disable it.
|
||||
barcodes:
|
||||
enabled: true
|
||||
barcodeString: "PATCHT"
|
||||
|
||||
Reference in new issue
Block a user